aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiakata <miakata@gmail.com>2019-04-27 20:57:13 +0200
committermiakata <miakata@gmail.com>2019-04-27 20:57:13 +0200
commit5b8e22009ffa9f1297dc3bb1bf1807fade67d79f (patch)
tree6e32e373468130033a666b7dd088aa33dc61352a /nGJ2019/Assets/Scripts/EventTimeline.cs
parent738f22bae44b4d57ae77419f48dbd4a7d57312d7 (diff)
parent2b8e13affdf1047b196e5e80288b80a6d5eda5cb (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.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/nGJ2019/Assets/Scripts/EventTimeline.cs b/nGJ2019/Assets/Scripts/EventTimeline.cs
index b864ae7..18b87cc 100644
--- a/nGJ2019/Assets/Scripts/EventTimeline.cs
+++ b/nGJ2019/Assets/Scripts/EventTimeline.cs
@@ -60,17 +60,20 @@ public class EventTimeline
{
currentTime += deltaTime;
- while(futureEvents.Count > 0 && currentTime > futureEvents[0].time && futureMessages.Count > 0 && currentTime > futureMessages[0].time)
+ while(futureEvents.Count > 0 && currentTime > futureEvents[0].time)
{
SpawnEvent e = futureEvents[0];
futureEvents.RemoveAt(0);
if(OnSpawnEvent != null)
OnSpawnEvent(e);
+ }
+ while(futureMessages.Count > 0 && currentTime > futureMessages[0].time)
+ {
MessageEvent m = futureMessages[0];
futureMessages.RemoveAt(0);
if(OnMessageEvent != null)
OnMessageEvent(m);
- }
+ }
}
}