NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Vehicle/Battery/BatteryStateAttackEnd.cs

35 lines
767 B
C#

using LTGame;
namespace Gameplay.Vehicle
{
public class BatteryStateAttackEnd : BaseBaterryState
{
private float _waitTime;
public BatteryStateAttackEnd(BaseBattery owner) : base(owner, EBatteryState.AttackEnd)
{
}
protected override void _OnEnter(NBaseState exitState,
object param)
{
base._OnEnter(exitState, param);
_waitTime = owner.owner.fightData.attackEndTime;
}
protected override void _OnRunning()
{
base._OnRunning();
if (passTime >= _waitTime)
{
isFinished = true;
nextState = EBatteryState.Idle;
}
}
}
}