aboutsummaryrefslogtreecommitdiff
path: root/td/Assets/Scripts/EnemySpawner.cs
diff options
context:
space:
mode:
authorJakob Stendahl <JakobS1n@users.noreply.github.com>2017-10-14 23:17:09 +0200
committerGitHub <noreply@github.com>2017-10-14 23:17:09 +0200
commit8b2c937959c99ab2dfbc3eaf9dc5b9c18cf73371 (patch)
treeb775b07054de58f83cd9df41bf43e61b3facfad1 /td/Assets/Scripts/EnemySpawner.cs
parent76cf99ade6530bdad81088295fb4cf73f5c5b118 (diff)
parentabe835d1112e4804ce63b7d2fa85f8bd76e3c237 (diff)
downloadTD-8b2c937959c99ab2dfbc3eaf9dc5b9c18cf73371.tar.gz
TD-8b2c937959c99ab2dfbc3eaf9dc5b9c18cf73371.zip
Merge pull request #4 from JakobS1n/GUI
Gui
Diffstat (limited to 'td/Assets/Scripts/EnemySpawner.cs')
-rw-r--r--td/Assets/Scripts/EnemySpawner.cs27
1 files changed, 0 insertions, 27 deletions
diff --git a/td/Assets/Scripts/EnemySpawner.cs b/td/Assets/Scripts/EnemySpawner.cs
deleted file mode 100644
index eb0dd43..0000000
--- a/td/Assets/Scripts/EnemySpawner.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class EnemySpawner : MonoBehaviour {
-
- public Enemy enemyPrefab;
- public Transform pathWay;
- public Transform gameWorld;
-
- int wave;
- int next = 1;
- int n = 0;
-
- void Update () {
- n++;
-
- if (n == next) {
- n = 0;
- next = (int)Random.Range (50, 400);
-
- Enemy newEnemy = Instantiate (enemyPrefab, new Vector3(0, 0, 0), Quaternion.identity, gameWorld);
- newEnemy.GetComponent <Enemy> ().pathWay = pathWay;
- newEnemy.GetComponent <Enemy> ().speed = Random.Range (0.3f, 1.2f);
- }
- }
-}