예제 #1
0
파일: Ball.cs 프로젝트: magelon/blockB
 //Called when the ball goes underneath the paddle and "dies"
 public void ResetBall()
 {
     transform.position = Vector3.zero;                      //Sets the ball position to the middle of the screen
     direction          = Vector2.down;                      //Sets the ball's direction to go down
     StartCoroutine("ResetBallWaiter");                      //Starts the 'ResetBallWaiter' coroutine to have the ball wait 1 second before moving
     manager.LiveLost();                                     //Calls the 'LiveLost()' function in the GameManager function
 }