Added a bunch of stuff

This commit is contained in:
2018-04-10 23:53:49 +10:00
parent efe1cd63f5
commit ba4b01653d
33 changed files with 2120 additions and 65 deletions
+5
View File
@@ -7,7 +7,11 @@ public class MonsterSpawner : MonoBehaviour {
public Vector2 motion;
public float delay;
AudioSource audioSource;
void Awake() {
audioSource = GetComponent<AudioSource> ();
StartCoroutine (SpawnMonster ());
}
@@ -17,6 +21,7 @@ public class MonsterSpawner : MonoBehaviour {
GameObject monster = Instantiate (monsterPrefab);
monster.transform.position = transform.position;
monster.GetComponent<Rigidbody2D> ().velocity = motion;
audioSource.Play ();
}
}
}