mirror of
https://github.com/Ellpeck/Coroutine.git
synced 2024-05-19 15:41:23 +02:00
20 lines
435 B
C#
20 lines
435 B
C#
|
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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|