public override void Update(GameTime deltaTime, GamePlayer player) { foreach (GamePawn pawn in player.Pawns) { if (pawn.AnimationPlayer != null) { // Show idle animation if done if (pawn.AnimationPlayer.Done) pawn.ShowIdle(); else if ( pawn.AnimationPlayer.CurrentClip != null ) { if ( pawn.AnimationPlayer.CurrentClip.Name != "idle" ) pawn.ShowIdle(); } } } if (!TutorialManager.Instance.IsTutorialOpen()) { // If the camera is stationary if (CameraManager.Instance.ActiveCamera != null) { if (!CameraManager.Instance.ActiveCamera.Tween) { // Selected play code only if (player.Selected) { // Active pawn only if (player.ActivePawn != null) { bool rollDice = false; if (player.Control == Player.PlayerControl.Human) { if (InputHandle.GetKeyDown(Keys.Enter)) rollDice = true; } else if (player.Control == Player.PlayerControl.AI) { if ((m_WaitRollTime -= (float)deltaTime.ElapsedGameTime.TotalSeconds) <= 0.0f) rollDice = true; } // If roll dice is true play turn if (rollDice) { // Begin rolling the dice player.BeginRollDice(); } else player.ActivePawn.ShowSelected(); } } } } } // MAKE sure this is after changing state base.Update(deltaTime, player); }