feat: ICoroutineYield for Delaying Coroutines
This commit is contained in:
12
Engine.Core/CoroutineYield.cs
Normal file
12
Engine.Core/CoroutineYield.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
using Syntriax.Engine.Core.Abstract;
|
||||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
public class CoroutineYield(Func<bool> condition) : ICoroutineYield
|
||||
{
|
||||
private readonly Func<bool> condition = condition;
|
||||
|
||||
public bool Yield() => condition.Invoke();
|
||||
}
|
Reference in New Issue
Block a user