Ejemplo n.º 1
0
 public void StartMultiplayer()
 {
     actualMode = PONGMode.Multiplayer;
     if (enhanced != null)
     {
         enhanced.SetPaddleOriginalSize(playerOne.gameObject);
         enhanced.SetPaddleOriginalSize(playerTwo.gameObject);
     }
     matchStarted = true;
     HideObjects();
     StartCoroutine(ball.InitMatch());
 }
Ejemplo n.º 2
0
 public void StartSinglePlayer()
 {
     if (ballRigid == null)
     {
         ballRigid = ball.gameObject.GetComponent <Rigidbody2D>();
     }
     if (aiPlayer == null)
     {
         aiPlayer = playerTwo.gameObject.GetComponent <PONGAI>();
     }
     actualMode = PONGMode.SinglePlayer;
     if (enhanced != null)
     {
         enhanced.SetPaddleOriginalSize(playerOne.gameObject);
         enhanced.SetPaddleOriginalSize(playerTwo.gameObject);
     }
     matchStarted = true;
     HideObjects();
     playerTwo.ControlledByAI = true;
     StartCoroutine(ball.InitMatch());
 }