Esempio n. 1
0
        public void CallGuiControlUpdates(Minijam32 game)
        {
            this._key   = Keyboard.GetState();
            this._mouse = Mouse.GetState();

            //code
            if (screenState == ScreenState.Start)
            {
                menuGui.Update(game, _mouse, _oldMouse, _key, _oldKey);
            }
            else if (screenState == ScreenState.Playing)
            {
                PlayerController.UpdateMovement(game, _key, _oldKey);
            }
            else if (screenState == ScreenState.DeadGameOver)
            {
                newLevelDrawer.UpdateDeathScene(game, _key, _oldKey);
            }
            else if (screenState == ScreenState.SwitchingLevel)
            {
                this.currentNewLevelDelayLeft -= Minijam32.DeltaUpdate;
                if (currentNewLevelDelayLeft <= 0f)
                {
                    screenState = ScreenState.Playing;
                    game.musicPlayer.Unmute();
                }
            }
            else if (screenState == ScreenState.FinishedGame)
            {
                this.finishedGameDrawer.Update(game, _key, _oldKey);
            }

            this._oldKey   = this._key;
            this._oldMouse = this._mouse;
        }
Esempio n. 2
0
        public override void ActiveUpdate(GameTime gt)
        {
            base.ActiveUpdate(gt);

            menu.Update(gt, this);
            sheetList.Update();
            selector.Update();
            frames.Update(gt);
            prev.Update(gt);
            animList.Update(gt);
        }