public void SwitchState(NormlWalkSubState state) { if (this.curState != state) { switch (this.curState) { case NormlWalkSubState.none: OnLeave_none(); break; case NormlWalkSubState.beControl: OnLeave_beControl(); break; case NormlWalkSubState.move: OnLeave_move(); break; case NormlWalkSubState.charge: OnLeave_charge(); break; default: break; } this.curState = state; switch (this.curState) { case NormlWalkSubState.none: OnBefore_none(); break; case NormlWalkSubState.beControl: OnBefore_beControl(); break; case NormlWalkSubState.move: OnBefore_move(); break; case NormlWalkSubState.charge: OnBefore_charge(); break; default: break; } } }
public override void DoBeforeEntering() { this.curState = NormlWalkSubState.none; }