aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Bybjerg <mikkel.bybjerg@hotmail.com>2019-04-27 11:14:45 +0200
committerMikkel Bybjerg <mikkel.bybjerg@hotmail.com>2019-04-27 11:14:45 +0200
commit12f21516ffd7caacfec259d6771677769384ffe8 (patch)
tree31ddc0544f39934e3780b96d145c7525cf3d6704 /nGJ2019/Assets/Scripts/EventTimeline.cs
parent0ef7e7d16e955401131fb2110c3b3dda66ccc0e3 (diff)
enemy collision and health
Diffstat (limited to 'nGJ2019/Assets/Scripts/EventTimeline.cs')
-rw-r--r--nGJ2019/Assets/Scripts/EventTimeline.cs10
1 files changed, 4 insertions, 6 deletions
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));