Coroutine/Coroutine/WaitSeconds.cs

20 lines
435 B
C#
Raw Normal View History

2019-06-22 17:24:50 +02:00
namespace Coroutine {
public class WaitSeconds : Wait {
private double seconds;
public WaitSeconds(double seconds) {
this.seconds = seconds;
}
public override WaitType GetWaitType() {
return WaitType.Tick;
}
public override bool Tick(double deltaSeconds) {
this.seconds -= deltaSeconds;
return this.seconds <= 0;
}
}
}