Esempio n. 1
0
        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);
        }
Esempio n. 2
0
            public Action Handle()
            {
                LoopAction self = this;

                return(() =>
                {
                    self.action();
                    ScheduleManager.Schedule(self.time, self.Handle());
                });
            }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
        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);
                }
            });
        }