Exemple #1
0
 public void Init(Entity o, string name)
 {
     owner = o;
     machine = new StateMachine(name);
     machine.AddState((int)AIState.IDLE, () => owner.StartIdle(), () => owner.Idling(), () => owner.EndIdle());
     machine.AddState((int)AIState.MOVE, () => owner.StartMove(), () => owner.Moving(), () => owner.EndMove());
     machine.ToState((int)AIState.IDLE);
 }