LimitBounds
How do I use Limit Bounds
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
24 | LimitBounds (); | 1 |
30 | LimitBounds (); | 2 |
77 | void LimitBounds(){ | 3 |
File name: EnemySpawner.cs
Copy
22 void Start () {
23 InitializeVariables ();
24 LimitBounds ();
25 }
File name: EnemySpawner.cs
Copy
28 void Update () {
29 if(GameplayController.instance.gameInProgress){
30 LimitBounds ();
31 SpawnEnemies ();
32 CheckedEnemies ();
33 }
34 }
File name: EnemySpawner.cs
Copy
77 void LimitBounds(){
78 Vector3 topBoundary = Camera.main.ViewportToWorldPoint (new Vector3 (0, 1, 0));
79 maxTop = topBoundary.y;
80 }
LimitBounds 106 lượt xem
Gõ tìm kiếm nhanh...