Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Spawner : MonoBehaviour
- {
- public GameObject EnemyPrefab;
- public float respawnTime = 260;
- void Update()
- {
- if (respawnTime <= 0)
- {
- Instantiate(EnemyPrefab);
- respawnTime = 260;
- }
- else
- {
- respawnTime = respawnTime - 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement