private void DoActions(KaiTool_StateController controller) { for (int i = 0; i < m_actions.Length; i++) { m_actions[i].Act(controller); } }
private void CheckTransition(KaiTool_StateController controller) { for (int i = 0; i < m_transitions.Length; i++) { if (m_transitions[i].m_decition.Decide(controller)) { controller.TransitionToState(m_transitions[i].m_trueState); } else { controller.TransitionToState(m_transitions[i].m_falseState); } } }
public override bool Decide(KaiTool_StateController controller) { return(true); }
public override void Act(KaiTool_StateController controller) { }
public abstract bool Decide(KaiTool_StateController controller);
public void UpdateState(KaiTool_StateController controller) { DoActions(controller); CheckTransition(controller); }
public abstract void Act(KaiTool_StateController controller);