feat: ICoroutineYield for Delaying Coroutines

This commit is contained in:
2024-11-02 22:27:04 +03:00
parent eb445604e8
commit cb60c71184
4 changed files with 30 additions and 0 deletions

View 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();
}