//======================================================================

        void Awake()
        {
            // Check external references
            Assert.IsNotNull(sel);
            // Cache components
            _agg = GetComponent <Aggressive> ();
            _mov = sel.mov;
        }
Example #2
0
 public virtual void SetReferences()
 {
     view          = GetComponent <SelectableView> ();
     selectionMngr = FindObjectOfType <SelectionMngr> ();
     mov           = GetComponent <Movable> ();
     att           = GetComponentInChildren <Attackable> ();
     aggPA         = GetComponentInChildren <AggressivePlayerAttack> ();
     aggAA         = GetComponentInChildren <AggressiveAutoAttack> ();
 }
Example #3
0
        //======================================================================

        void Awake()
        {
            // Check external references
            Assert.IsNotNull(sel);
            // Cache components
            _trans = transform;
            _agg   = GetComponent <Aggressive> ();
            _mov   = sel.mov;
            // Auto attack integrity
            Assert.IsTrue(
                autoChaseRange + _agg.weapon.distance > autoAttackRange
                );
        }
 public void SetReferences()
 {
     sel       = GetComponentInParent <SelectableCtrl> ();
     sel.aggPA = this;
     _mov      = sel.mov;
 }