ソースコード
using System;
using System.Threading;
namespace Cysharp.Threading.Tasks
{
public partial struct UniTask
{
public static UniTask DelaySeconds
(
double seconds,
bool ignoreTimeScale = false,
PlayerLoopTiming delayTiming = PlayerLoopTiming.Update,
CancellationToken cancellationToken = default( CancellationToken )
)
{
return Delay
(
delayTimeSpan: TimeSpan.FromSeconds( seconds ),
ignoreTimeScale: ignoreTimeScale,
delayTiming: delayTiming,
cancellationToken: cancellationToken
);
}
public static UniTask DelaySeconds
(
double seconds,
DelayType delayType,
PlayerLoopTiming delayTiming = PlayerLoopTiming.Update,
CancellationToken cancellationToken = default( CancellationToken )
)
{
return Delay
(
delayTimeSpan: TimeSpan.FromSeconds( seconds ),
delayType: delayType,
delayTiming: delayTiming,
cancellationToken: cancellationToken
);
}
}
}