Beispiel #1
0
 private void playerMadeTurn(object sender, TurnEventArgs args)
 {
     if (sender == currentPlayer)
     {
         if (OnTurn != null)
         {
             if (gameBoard.Winner)
             {
                 args.Winner = (BasePlayer)(sender);
             }
             OnTurn(this, args);
         }
         if (!gameBoard.Winner)
         {
             nextPlayer();
         }
     }
     else
     {
         //throw something really terrible here!
     }
 }
Beispiel #2
0
 public void OnTurnDone(object sender, TurnEventArgs args)
 {
     curentTurn = args.Turn;
     if (curentTurn.side == Side.Cross)
     {
         curentTurnAnimation = createTurnAnimation(crossFrames, 60, 10);
     }
     else if (curentTurn.side == Side.Zero)
     {
         curentTurnAnimation = createTurnAnimation(zeroFrames, 60, 10);
     }
     curentTurnAnimation.Repeat = false;
 }
Beispiel #3
0
 public void OnEnemyMadeTurn(Object sender, TurnEventArgs args)
 {
     playerAI.EnemyTurn(args.Turn.position);
     timeToMakeTheTurn = true;
 }
Beispiel #4
0
 private void NewTurnDone(object sender, TurnEventArgs args)
 {
     UpdateVirtualViewport();
 }