예제 #1
0
 public Attacking(GameObject obj)
 {
     this.obj = obj;
     ctrl     = this.obj.GetComponent <NewMinionCtrl>();
     anim     = this.obj.GetComponent <Animator>();
     // by default we dont have a target
     attackTarget = null;
 }
예제 #2
0
 public Walking(GameObject obj)
 {
     this.obj = obj;
     // set references
     ctrl = this.obj.GetComponent <NewMinionCtrl>();
     rb   = this.obj.GetComponent <Rigidbody>();
     anim = this.obj.GetComponent <Animator>();
     // Set the initial target to null
     target = null;
 }
예제 #3
0
    NewMinionCtrl ctrl; // reference to the minion controller

    public IdleState(GameObject obj)
    {
        this.obj = obj;
        ctrl     = this.obj.GetComponent <NewMinionCtrl>();
        anim     = this.obj.GetComponent <Animator>();
    }
예제 #4
0
 private void Awake()
 {
     minCtrl       = GetComponentInParent <NewMinionCtrl>();
     obj           = minCtrl.gameObject;
     aggroCollider = gameObject.GetComponent <SphereCollider>();
 }