Example #1
0
 public void SetTask(CollectType collectType, EnvironmentCreate environmentCreate, Transform commender)
 {
     this.collectType       = collectType;
     this.environmentCreate = environmentCreate;
     this.commender         = commender;
     FSM.SetState(new NPCFindCollect(FSM));
 }
Example #2
0
 public NPCMoveCollect(Transform target, NPC_FSM _FSM)
 {
     this._FSM = _FSM;
     _FSM.NPC_Obj.anima.Run();
     this.target = target;
     try
     {
         _FSM.NPC_Obj.meshAgent.SetDestination(target.position);
         target.GetComponent <Collect>().OncollectDestroy += Finish;
     }
     catch (MissingReferenceException)
     {
         _FSM.SetState(new NPCMoveHome(_FSM));
     }
 }