11 lines
249 B
C#
11 lines
249 B
C#
using System;
|
|
|
|
namespace Engine.Core;
|
|
|
|
public class WaitForSecondsYield(float seconds) : ICoroutineYield
|
|
{
|
|
private readonly DateTime triggerTime = DateTime.UtcNow.AddSeconds(seconds);
|
|
|
|
public bool Yield() => DateTime.UtcNow < triggerTime;
|
|
}
|