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

View file

@ -0,0 +1,27 @@
[package]
name = "executor-android"
version = "0.1.0"
edition = "2021"
[package.metadata.android]
# This folder is used as a temporary storage for assets. Project exporter will clone everything
# from data folder to this folder and cargo-apk will create the apk with these assets.
assets = "assets"
strip = "strip"
[package.metadata.android.sdk]
min_sdk_version = 26
target_sdk_version = 30
max_sdk_version = 29
[package.metadata.android.signing.release]
path = "release.keystore"
keystore_password = "fyrox-template"
[lib]
crate-type = ["cdylib"]
[dependencies]
fyrox = { workspace = true }
red_dragon_pon = { path = "../game" }

View file

@ -0,0 +1,5 @@
## Android Build Instructions
- `cargo-apk apk run --target=armv7-linux-androideabi`
TODO: Add more detailed instructions.

Binary file not shown.

View 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()
}