// ------------------------------------------------------------------------
// Copyright (c) 2021-2026, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ------------------------------------------------------------------------
namespace Engine.Coroutine
{
using System;
using UnityEngine;
///
/// A static class that provides yield instructions for coroutines.
///
public static class CoroutineYieldInstruction
{
///
/// Waits for the specified number of seconds before continuing the coroutine.
///
/// The number of seconds to wait.
/// A yield instruction that waits for the specified number of seconds.
public static object WaitForSeconds(float seconds)
{
return new WaitForSeconds(seconds);
}
///
/// Waits until the specified predicate returns true before continuing the coroutine.
///
/// The predicate to evaluate.
/// A yield instruction that waits until the predicate returns true.
public static object WaitUntil(Func predicate)
{
return new WaitUntil(predicate);
}
}
}