StopBall
How do I use Stop Ball
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
47 | public void StopBall() | 1 |
99 | Ball.StopBall(); | 2 |
File name: BallScript.cs
Copy
47 public void StopBall()
48 {
49 GetComponent
50 }
File name: GameManager.cs
Copy
84 public void DecreaseLives()
85 {
86 if (Lives > 0)
87 Lives--;
88
89 if(Lives == 0)
90 {
91 statusText.text = "Lost all lives. Tap to play again";
92 CurrentGameState = GameState.LostAllLives;
93 }
94 else
95 {
96 statusText.text = "Lost a life. Tap to continue";
97 CurrentGameState = GameState.LostALife;
98 }
99 Ball.StopBall();
100 }
StopBall 113 lượt xem
Gõ tìm kiếm nhanh...