Add WaitForSeconds method declarations #371

master
Sébastien Gaumin 2023-04-07 00:33:31 +09:00
parent 73d86259ce
commit 3ca4062536
1 changed files with 11 additions and 1 deletions

View File

@ -111,6 +111,16 @@ namespace Cysharp.Threading.Tasks
return UniTask.Yield(PlayerLoopTiming.LastFixedUpdate, cancellationToken);
}
public static UniTask WaitForSeconds(float duration, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
{
return Delay(Mathf.RoundToInt(1000 * duration), ignoreTimeScale, delayTiming, cancellationToken);
}
public static UniTask WaitForSeconds(int duration, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
{
return Delay(1000 * duration, ignoreTimeScale, delayTiming, cancellationToken);
}
public static UniTask DelayFrame(int delayFrameCount, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken))
{
if (delayFrameCount < 0)