예제 #1
0
파일: Robot.cs 프로젝트: Lostage3/GitTest
 public void SwitchState(RobotState robotState)
 {
     currentState.OnStateExit();
     currentState       = robotState;
     currentState.robot = this;
     currentState.OnStateEnter();
 }
예제 #2
0
 public void SwitchState(RobotState state)
 {
     currentState?.OnStateExit();
     currentState       = state;
     currentState.robot = this;
     currentState.OnStateEnter();
     txt.text = "State : " + currentState.GetType().ToString();
 }