Initial Fyrox project
This commit is contained in:
commit
27d327933e
23 changed files with 5633 additions and 0 deletions
17
executor-android/src/lib.rs
Normal file
17
executor-android/src/lib.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
//! Android executor with your game connected to it as a plugin.
|
||||
use fyrox::{
|
||||
core::io, engine::executor::Executor, event_loop::EventLoopBuilder,
|
||||
platform::android::EventLoopBuilderExtAndroid,
|
||||
};
|
||||
use red_dragon_pon::Game;
|
||||
|
||||
#[no_mangle]
|
||||
fn android_main(app: fyrox::platform::android::activity::AndroidApp) {
|
||||
io::ANDROID_APP
|
||||
.set(app.clone())
|
||||
.expect("ANDROID_APP cannot be set twice.");
|
||||
let event_loop = EventLoopBuilder::new().with_android_app(app).build().unwrap();
|
||||
let mut executor = Executor::from_params(event_loop, Default::default());
|
||||
executor.add_plugin(Game::default());
|
||||
executor.run()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue