Update() public method

public Update ( ) : void
return void
Exemplo n.º 1
0
    void OnGUI()
    {
        if (currentScreen.DrawBackground)
        {
            GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), BackgroundTexture);
        }

        currentScreen = currentScreen.Update();
    }
Exemplo n.º 2
0
 public override void Update(GameTime gameTime)
 {
     keyboard.Update();
     if (gameState == GameState.Menu)
     {
         menuScreen.Update(gameTime);
     }
     else if (gameState == GameState.Play)
     {
         gameScreen.Update(gameTime);
     }
     if (IsExiting)
     {
         this.Game.Exit();
     }
     base.Update(gameTime);
 }
Exemplo n.º 3
0
        //----------------------------------------------------------------------
        public virtual void Update(float _fElapsedTime)
        {
            MenuScreen.IsActive  = Game.IsActive && (Game.GameStateMgr == null || !Game.GameStateMgr.IsSwitching) && mPopupStack.Count == 0;
            PopupScreen.IsActive = Game.IsActive && (Game.GameStateMgr == null || !Game.GameStateMgr.IsSwitching) && mPopupStack.Count > 0;

            MenuScreen.HandleInput();
            if (mPopupStack.Count > 0)
            {
                PopupScreen.HandleInput();
            }

            MenuScreen.Update(_fElapsedTime);
            if (mPopupStack.Count > 0)
            {
                PopupScreen.Update(_fElapsedTime);
            }
        }