示例#1
0
 public void UITriggerState(ActionState stateToTrigger)
 {
     if (stateToTrigger.GetComponent <StateMachine>() != GetComponent <StateMachine>())
     {
         Debug.LogError("It looks like this event was hooked into the wrong creature");
     }
     else
     {
         var currentState = Helper.GetCurrentStateInstance(GetComponent <StateMachine>());
         currentState.HandleOutTriggered(Helper.GetActionStateInstance(stateToTrigger, GetComponent <StateMachine>()));
     }
 }