protected override void Update(GameTime gameTime) { float dt = (float)gameTime.ElapsedGameTime.TotalSeconds; Input.Update(dt); ScheduleManager.Update(dt); ScreenManager.CurrentScreen.Update(dt); base.Update(gameTime); }
public Action Handle() { LoopAction self = this; return(() => { self.action(); ScheduleManager.Schedule(self.time, self.Handle()); }); }
public void Exit() { ScheduleManager.Clear(); client.CharacterUpdated -= world.OnCharacterUpdated; client.DropAdded -= world.OnDropAdded; client.DropRemoved -= world.OnDropRemoved; client.BuffAdded -= world.OnBuffAdded; client.BuffRemoved -= world.OnBuffRemoved; client.PowerUpAdded -= world.OnPowerUpAdded; client.PowerUpRemoved -= world.OnPowerUpRemoved; client.TintaSplashAdded -= world.OnTintaSplashAdded; client.TintaSplashRemoved -= world.OnTintaSplashRemoved; }
public new void Enter() { Input.Pressed += OnBackPressed; base.Enter(); ScheduleManager.ScheduleInLoop(3, () => { if (server.world != null) { SurpriseBoxDrop dummyBox = new SurpriseBoxDrop(0, 0); dummyBox.SpawnInAnEmptyPosition(server.world.maze); Point spawnPosition = dummyBox.GetAABB().Center; server.AddDrop((int)DropTypes.SurpriseBoxDrop, spawnPosition.X, spawnPosition.Y); } }); }