29 lines
747 B
C#
29 lines
747 B
C#
using Cysharp.Threading.Tasks;
|
|
|
|
namespace Code.OfficeGame.BattleMode.Actions
|
|
{
|
|
public class BattleActionWait : BattleAction
|
|
{
|
|
private int _waitFrames;
|
|
public override void Tick(float tickDelta)
|
|
{
|
|
_waitFrames--;
|
|
if (_waitFrames <= 0) Finished = true;
|
|
}
|
|
|
|
public override async UniTask<BattleActionDecisionResult> DecideAction()
|
|
{
|
|
Finished = false;
|
|
|
|
_waitFrames = 120;
|
|
|
|
return new()
|
|
{
|
|
ResultCode = BattleActionDecisionResultCode.Decided,
|
|
FrameDuration = _waitFrames
|
|
};
|
|
}
|
|
|
|
public override BattleActionType ActionType => BattleActionType.Wait;
|
|
}
|
|
} |