//----------------------------------------------------------------------------- // Game::Update() // Called once per frame, update data, tranformations, etc // Use this function to control process order // Input, AI, Physics, Animation, and Graphics //----------------------------------------------------------------------------- public override void Update() { // Add your update below this line: ---------------------------- // stuff called every update no matter the scene here... // example: like audio update GlobalTimer.Update(this.GetTime()); // Hack to proof of concept... if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_0) == true) { pSceneContext.SetState(SceneContext.Scene.Demo); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_3) == true) { pSceneContext.SetState(SceneContext.Scene.Select); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_1) == true) { pSceneContext.SetState(SceneContext.Scene.Play); Score.SetCurrentPlayer(1); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_2) == true) { pSceneContext.SetState(SceneContext.Scene.Play); Score.SetCurrentPlayer(2); } if (Azul.Input.GetKeyState(Azul.AZUL_KEY.KEY_4) == true) { pSceneContext.SetState(SceneContext.Scene.GameOver); } // Update the scene (pSceneContext.GetState()).Update(this.GetTime()); }
//----------------------------------------------------------------------------- // Game::Update() // Called once per frame, update data, tranformations, etc // Use this function to control process order // Input, AI, Physics, Animation, and Graphics //----------------------------------------------------------------------------- public override void Update() { GlobalTimer.Update(this.GetTime()); SceneContext.GetState().Update(this.GetTime()); }