示例#1
0
 public bool PlayState(string StateName,Action onEnd=null, bool immdiately=false)
 {
     if (Debug)
     {
         StateDebug(StateName);
     }
    ActionStatement state= Statements.Find(e => e.name == StateName);
     if(state==null)return false;
     if (PackPlayer.SetCurrent(state.actions, onEnd, immdiately))
     {
         PackPlayer.Restart();
         return true;
     }
     return false;
 }
 public override void Play()
 {
     base.Play();
     if (NeedActive)
     {
         if (!list.gameObject.activeInHierarchy)
         {
             this.End();
             return;
         }
     }
     if (Player.SetCurrent(list))
     {
         Player.Restart();
     }
     this.End();
 }