Coroutine/Coroutine/WaitEvent.cs

25 lines
477 B
C#
Raw Normal View History

using System;
2019-06-22 17:24:50 +02:00
namespace Coroutine {
public struct WaitEvent : IWait {
2019-06-22 17:24:50 +02:00
private readonly Event evt;
public WaitEvent(Event evt) {
this.evt = evt;
}
public WaitType GetWaitType() {
2019-06-22 17:24:50 +02:00
return WaitType.Event;
}
public bool Tick(double deltaSeconds) {
throw new NotSupportedException();
}
public bool OnEvent(Event evt) {
2019-06-22 17:24:50 +02:00
return evt == this.evt;
}
}
}