Update() public method

public Update ( ) : void
return void
コード例 #1
0
    void OnGUI()
    {
        if (currentScreen.DrawBackground)
        {
            GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), BackgroundTexture);
        }

        currentScreen = currentScreen.Update();
    }
コード例 #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);
 }
コード例 #3
0
ファイル: MenuManager.cs プロジェクト: elisee/NuclearWinter
        //----------------------------------------------------------------------
        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);
            }
        }