public override void Update(GameTime deltaTime, GamePlayer player) { if (player.ActivePawn != null) { // Show idle animation if done if (player.ActivePawn.AnimationPlayer.Done) { if (player.PawnsAtEnd == 0) player.ShowFirstPawnAtEnd(); else if (player.PawnsAtEnd == 1) player.ShowSecondPawnAtEnd(); // Increment number of pawns reached end for this player player.PawnsAtEnd += 1; if (player.PawnsAtEnd == player.Pawns.Count) { // Player has won the game so fire a player won event with this players index // attached to it PlayerWonEvent wonEvent = new PlayerWonEvent(player.Index); wonEvent.Fire(); } else { // Otherwise end turn player.ChangeState_EndOfTurn(); } } else player.ActivePawn.ShowTrail(); } // MAKE sure this is after changing state base.Update(deltaTime, player); }