Initial Fyrox project
This commit is contained in:
commit
27d327933e
23 changed files with 5633 additions and 0 deletions
27
executor-android/Cargo.toml
Normal file
27
executor-android/Cargo.toml
Normal 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" }
|
5
executor-android/README.md
Normal file
5
executor-android/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Android Build Instructions
|
||||
|
||||
- `cargo-apk apk run --target=armv7-linux-androideabi`
|
||||
|
||||
TODO: Add more detailed instructions.
|
BIN
executor-android/release.keystore
Normal file
BIN
executor-android/release.keystore
Normal file
Binary file not shown.
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