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/EventTimeline.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'nGJ2019/Assets/Scripts/EventTimeline.cs') diff --git a/nGJ2019/Assets/Scripts/EventTimeline.cs b/nGJ2019/Assets/Scripts/EventTimeline.cs index 1aef359..21b0bdb 100644 --- a/nGJ2019/Assets/Scripts/EventTimeline.cs +++ b/nGJ2019/Assets/Scripts/EventTimeline.cs @@ -4,15 +4,13 @@ using System.Collections.Generic; public class EventTimeline { - public enum SpawnEventType {alfa, beta}; - - public class SpawnEvent + public class SpawnEvent { public float time; public float height; - public SpawnEventType type; + public ObstacleType type; - public SpawnEvent(float time, float height, SpawnEventType type) + public SpawnEvent(float time, float height, ObstacleType type) { this.time = time; this.height = height; @@ -31,7 +29,7 @@ public class EventTimeline currentTime = 0; } - public void Add(float time, float height, SpawnEventType type) + public void Add(float time, float height, ObstacleType type) { futureEvents.Add(new SpawnEvent(time, height, type)); futureEvents.Sort((x,y) => x.time.CompareTo(y.time)); -- cgit v1.2.3