fix compiler errors after some changes to game crate

This commit is contained in:
SeanOMik 2024-02-23 16:43:23 -05:00
parent f2d302c6d4
commit 1f43a9d4da
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
3 changed files with 6 additions and 6 deletions

View File

@ -206,7 +206,7 @@ async fn main() {
Ok(())
};
let fps_plugin = move |game: &mut Game| {
let world = game.world();
let world = game.world_mut();
world.add_resource(fps_counter::FPSCounter::new());
};
@ -228,7 +228,7 @@ async fn main() {
};
let jiggle_plugin = move |game: &mut Game| {
game.world().add_resource(TpsAccumulator(0.0));
game.world_mut().add_resource(TpsAccumulator(0.0));
let mut sys = BatchedSystem::new();
sys.with_criteria(FixedTimestep::new(45));
@ -293,7 +293,7 @@ async fn main() {
Ok(())
}; */
let world = game.world();
let world = game.world_mut();
world.add_resource(action_handler);
world.spawn((Vec3::new(0.5, 0.1, 3.0),));
game.with_plugin(InputActionPlugin);
@ -303,7 +303,7 @@ async fn main() {
let script_test_plugin = |game: &mut Game| {
game.with_plugin(LuaScriptingPlugin);
let world = game.world();
let world = game.world_mut();
let mut res_man = world.get_resource_mut::<ResourceManager>();
let script = res_man.request::<LuaScript>("scripts/test.lua").unwrap();
res_man.watch("scripts/test.lua", false).unwrap();

View File

@ -134,7 +134,7 @@ impl GameScriptExt for Game {
T: ScriptHost,
P: ScriptApiProvider<ScriptContext = T::ScriptContext> + 'static
{
let world = self.world();
let world = self.world_mut();
provider.prepare_world(world);
let mut providers = world.get_resource_mut::<ScriptApiProviders<T>>();
providers.add_provider(provider);

View File

@ -171,7 +171,7 @@ pub struct LuaScriptingPlugin;
impl Plugin for LuaScriptingPlugin {
fn setup(&self, game: &mut lyra_game::game::Game) {
let world = game.world();
let world = game.world_mut();
world.add_resource_default::<TypeRegistry>();