feat: added WaitForSeconds and WaitWhile yields
This commit is contained in:
10
Engine.Core/Systems/Yields/WaitWhileYield.cs
Normal file
10
Engine.Core/Systems/Yields/WaitWhileYield.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Engine.Core;
|
||||
|
||||
public class WaitWhileYield(Func<bool> condition) : ICoroutineYield
|
||||
{
|
||||
private readonly Func<bool> condition = condition;
|
||||
|
||||
public bool Yield() => condition.Invoke();
|
||||
}
|
||||
Reference in New Issue
Block a user