Example #1
0
 public GStateData(GFSM controller, NavMeshAgent agent, Transform targetTransform, Animator anim, string animationClip, float transitionTime)
 {
     this.controller      = controller;
     this.agent           = agent;
     this.targetLocation  = null;
     this.targetTransform = targetTransform;
     this.anim            = anim;
     this.animationClip   = animationClip;
     this.transitionTime  = transitionTime;
 }
Example #2
0
 private void OnValidate()
 {
     if (agent == null)
     {
         agent = GetComponent <NavMeshAgent>();
     }
     if (controller == null)
     {
         controller = GetComponent <GFSM>();
     }
 }
Example #3
0
 public GState(GStateData data)
 {
     //anim.ResetTrigger(animationClip);
     this.animationClip   = data.animationClip;
     this.anim            = data.anim;
     this.controller      = data.controller;
     this.agent           = data.agent;
     this.targetLocation  = data.targetLocation;
     this.targetTransform = data.targetTransform;
     this.transitionTime  = data.transitionTime;
     stateStage           = EVENT.ENTER;
 }