From 12f21516ffd7caacfec259d6771677769384ffe8 Mon Sep 17 00:00:00 2001 From: Mikkel Bybjerg Date: Sat, 27 Apr 2019 11:14:45 +0200 Subject: enemy collision and health --- nGJ2019/Assets/Scripts/ObstacleSpawner.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nGJ2019/Assets/Scripts/ObstacleSpawner.cs') diff --git a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs index d007513..7d2c2a9 100644 --- a/nGJ2019/Assets/Scripts/ObstacleSpawner.cs +++ b/nGJ2019/Assets/Scripts/ObstacleSpawner.cs @@ -15,10 +15,10 @@ public class ObstacleSpawner : MonoBehaviour { GameObject prefab = null; - if(e.type == EventTimeline.SpawnEventType.alfa) + if(e.type == ObstacleType.alfa) prefab = alfaPrefab; - if(e.type == EventTimeline.SpawnEventType.beta) + if(e.type == ObstacleType.beta) prefab = betaPrefab; Instantiate(prefab, new Vector3(spawnLine, e.height, 0), Quaternion.identity); @@ -26,10 +26,10 @@ public class ObstacleSpawner : MonoBehaviour void Start() { - timeline.Add(2, 2, EventTimeline.SpawnEventType.alfa); - timeline.Add(4, 2, EventTimeline.SpawnEventType.beta); - timeline.Add(5, -2, EventTimeline.SpawnEventType.beta); - timeline.Add(7, -3, EventTimeline.SpawnEventType.alfa); + timeline.Add(2, 4, ObstacleType.alfa); + timeline.Add(4, 2, ObstacleType.beta); + timeline.Add(5, -2, ObstacleType.beta); + timeline.Add(7, -3, ObstacleType.alfa); timeline.OnSpawnEvent += spawnOnEvent; } -- cgit v1.2.3