SpawnBoss
How do I use Spawn Boss
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
94 | public void SpawnBoss(){ | 1 |
156 | StartCoroutine (SpawnBossTime()); | 2 |
159 | IEnumerator SpawnBossTime(){ | 3 |
File name: EnemySpawner.cs
Copy
94 public void SpawnBoss(){
95 Instantiate (boss[0], new Vector3 (0, maxTop + 3, 0), Quaternion.Euler(0, 0, 180));
96 }
File name: GameplayController.cs
Copy
155 public void ShowWarning(){
156 StartCoroutine (SpawnBossTime());
157 }
File name: GameplayController.cs
Copy
159 IEnumerator SpawnBossTime(){
160 warningText.gameObject.SetActive (true);
161 warningText.transform.GetComponent
162 yield return new WaitForSeconds (5f);
163 warningText.gameObject.SetActive (false);
164 warningText.transform.GetComponent
165 GameObject.FindGameObjectWithTag ("Spawner").transform.GetComponent
166 }
SpawnBoss 120 lượt xem
Gõ tìm kiếm nhanh...