41 lines
951 B
C#
41 lines
951 B
C#
using Gameplay.Vehicle.Impl;
|
|
using LTGame;
|
|
namespace Gameplay.Vehicle.State
|
|
{
|
|
public class VehicleStateIdle: BaseVehicleState
|
|
{
|
|
|
|
public VehicleStateIdle(NormalVehicle owner) : base(owner, EVehicleState.Idle)
|
|
{
|
|
}
|
|
|
|
protected override void _OnEnter(NBaseState exitState,
|
|
object param)
|
|
{
|
|
base._OnEnter(exitState, param);
|
|
|
|
owner.vAnim.targetAnim = "idle";
|
|
}
|
|
|
|
protected override void _OnRunning()
|
|
{
|
|
base._OnRunning();
|
|
|
|
if (owner.aliveData.currentHp <= 0)
|
|
{
|
|
isFinished = true;
|
|
nextState = EVehicleState.Destroy;
|
|
return;
|
|
}
|
|
|
|
if (owner.controlData.targetCellIndex != -1)
|
|
{
|
|
isFinished = true;
|
|
nextState = EVehicleState.Move;
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|