Exemple #1
0
 public override void Dispose()
 {
     m_startTime = 0;
     execute     = false;
     isTimeout   = false;
     behavior?.Stop();
     behavior       = null;
     parentBehavior = null;
     order          = StateOrder.Sequence;
     subStateList?.Clear();
     m_node.Dispose();
     StateMachineManager.GetInstance().Store(this);
 }
Exemple #2
0
 public void Execute()
 {
     m_node.OnEnterDelegate();
     if (behavior != null)
     {
         if (order == StateOrder.Join)
         {
             behavior.Run();
             behavior.Update();
             behavior.Stop();
         }
         else
         {
             if (parentBehavior != null)
             {
                 parentBehavior.lastBehavior?.Stop();
                 behavior.Run();
                 parentBehavior.lastBehavior = behavior;
             }
         }
     }
 }
Exemple #3
0
 public void Stop()
 {
     lastBehavior?.Stop();
     lastBehavior = null;
     stateMachine?.Stop();
 }