aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiakata <miakata@gmail.com>2019-04-27 22:51:19 +0200
committermiakata <miakata@gmail.com>2019-04-27 22:51:19 +0200
commit87c702bbff7e39066c1aea6ed40c46a961a022d4 (patch)
tree74324c7f9dcfdd75fec8f66b1df0557799f3e9d4 /nGJ2019/Assets/Scripts/EventTimeline.cs
parentc34eb93d97ae8dcb51ef88dc9ddae5b40c81783e (diff)
parent932a418c3f2251d434b67d115aaa380b51685ef7 (diff)
Merge branch 'master' of https://github.com/marcinzelent/ngj2019
Diffstat (limited to 'nGJ2019/Assets/Scripts/EventTimeline.cs')
-rw-r--r--nGJ2019/Assets/Scripts/EventTimeline.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/nGJ2019/Assets/Scripts/EventTimeline.cs b/nGJ2019/Assets/Scripts/EventTimeline.cs
index 18b87cc..465815c 100644
--- a/nGJ2019/Assets/Scripts/EventTimeline.cs
+++ b/nGJ2019/Assets/Scripts/EventTimeline.cs
@@ -1,19 +1,20 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using UnityEngine;
public class EventTimeline
{
public class SpawnEvent
{
public float time;
- public float height;
+ public Vector3 position;
public ObstacleType type;
- public SpawnEvent(float time, float height, ObstacleType type)
+ public SpawnEvent(float time, Vector3 position, ObstacleType type)
{
this.time = time;
- this.height = height;
+ this.position = position;
this.type = type;
}
}
@@ -44,9 +45,9 @@ public class EventTimeline
currentTime = 0;
}
- public void Add(float time, float height, ObstacleType type)
+ public void Add(float time, Vector3 position, ObstacleType type)
{
- futureEvents.Add(new SpawnEvent(time, height, type));
+ futureEvents.Add(new SpawnEvent(time, position, type));
futureEvents.Sort((x,y) => x.time.CompareTo(y.time));
}