bevy_scriptum/examples/ruby/entity_variable.rs
Jarosław Konik 53479f94b5
Some checks are pending
Book / test (push) Waiting to run
Deploy book / deploy (push) Waiting to run
Rust / build (push) Waiting to run
Ruby support (#19)
Add support for Ruby language
2025-05-27 19:19:52 +02:00

17 lines
484 B
Rust

use bevy::prelude::*;
use bevy_scriptum::runtimes::ruby::prelude::*;
use bevy_scriptum::{prelude::*, BuildScriptingRuntime};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_scripting::<RubyRuntime>(|_| {})
.add_systems(Startup, startup)
.run();
}
fn startup(mut commands: Commands, assets_server: Res<AssetServer>) {
commands.spawn(Script::<RubyScript>::new(
assets_server.load("examples/ruby/entity_variable.rb"),
));
}