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

35
editor/src/main.rs Normal file
View file

@ -0,0 +1,35 @@
//! Editor with your game connected to it as a plugin.
use fyroxed_base::{fyrox::event_loop::EventLoop, Editor, StartupData, fyrox::core::log::Log};
fn main() {
Log::set_file_name("red_dragon_pon.log");
let event_loop = EventLoop::new().unwrap();
let mut editor = Editor::new(
Some(StartupData {
working_directory: Default::default(),
scenes: vec!["data/scene.rgs".into()],
}),
);
// 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";
editor.add_dynamic_plugin(file_name, true, true).unwrap();
}
// Static linking.
#[cfg(not(feature = "dylib"))]
{
use red_dragon_pon::Game;
editor.add_game_plugin(Game::default());
}
editor.run(event_loop)
}