Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class Spawner : MonoBehaviour
  2. {
  3. public GameObject EnemyPrefab;
  4. public float respawnTime = 260;
  5.  
  6. void Update()
  7. {
  8. if (respawnTime <= 0)
  9. {
  10. Instantiate(EnemyPrefab);
  11.  
  12. respawnTime = 260;
  13. }
  14. else
  15. {
  16. respawnTime = respawnTime - 1;
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement