Exemple #1
0
 private void ResetPlayers(bool isGameStarted)
 {
     ResetPlayersPosition();
     player1.ResetPoints();
     if (!isGameStarted)
     {
         player1.playerType = PlayerType.AI;
         player2.playerType = PlayerType.AI;
     }
     player2.ResetPoints();
     player1.GetComponent <AIDemo>().enabled   = true;
     player2.GetComponent <SimpleAI>().enabled = true;
     player1.speed       = player1.startSpeed;
     player1.paddleLenth = player1.startPaddleLenth;
     player1.ResetScale();
     player2.ResetScale();
     player2.speed       = player2.startSpeed;
     player2.paddleLenth = player2.startPaddleLenth;
 }