public override bool ExecuteState(FSM fsm) { if (!isInit) { FSM = fsm as PlayerFSM; currentUnit = FSM.GetOwner().CurrentSelectedUnit; enemyCurrentUnit = currentUnit.CurrentEnemy; isInit = OnStartState(); } if (OnExecuteState() || ForceQuit) { FSM.GetOwner().CurrentSelectedUnit.CurrentEnemy = null; FSM.GetOwner().CurrentSelectedUnit = null; FSM.ChangeState(PlayerFSM.PlayerStates.IDLE); return(OnEndState()); } return(false); }