fix compiler errors after some changes to game crate
This commit is contained in:
parent
f2d302c6d4
commit
1f43a9d4da
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>();
|
||||
|
||||
|
|
Loading…
Reference in New Issue