Initial Fyrox project

This commit is contained in:
Alexey 2025-07-08 17:43:03 +03:00
commit 27d327933e
23 changed files with 5633 additions and 0 deletions

13
executor/Cargo.toml Normal file
View file

@ -0,0 +1,13 @@
[package]
name = "executor"
version = "0.1.0"
edition = "2021"
[dependencies]
fyrox = { workspace = true }
red_dragon_pon = { path = "../game", optional = true }
[features]
default = ["red_dragon_pon"]
dylib = ["fyrox/dylib"]

30
executor/src/main.rs Normal file
View file

@ -0,0 +1,30 @@
//! Executor with your game connected to it as a plugin.
use fyrox::engine::executor::Executor;
use fyrox::core::log::Log;
fn main() {
Log::set_file_name("red_dragon_pon.log");
let mut executor = Executor::new();
// Dynamic linking with hot reloading.
#[cfg(feature = "dylib")]
{
#[cfg(target_os = "windows")]
let file_name = "game_dylib.dll";
#[cfg(target_os = "linux")]
let file_name = "libgame_dylib.so";
#[cfg(target_os = "macos")]
let file_name = "libgame_dylib.dylib";
executor.add_dynamic_plugin(file_name, true, true).unwrap();
}
// Static linking.
#[cfg(not(feature = "dylib"))]
{
use red_dragon_pon::Game;
executor.add_plugin(Game::default());
}
executor.run()
}