Exemplo n.º 1
0
        //======================================================================

        void Awake()
        {
            // Check external references
            Assert.IsNotNull(sel);
            // Cache components
            _agg = GetComponent <Aggressive> ();
            _mov = sel.mov;
        }
Exemplo n.º 2
0
 public virtual void SetReferences()
 {
     view          = GetComponent <SelectableView> ();
     selectionMngr = FindObjectOfType <SelectionMngr> ();
     mov           = GetComponent <Movable> ();
     att           = GetComponentInChildren <Attackable> ();
     aggPA         = GetComponentInChildren <AggressivePlayerAttack> ();
     aggAA         = GetComponentInChildren <AggressiveAutoAttack> ();
 }
Exemplo n.º 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
                );
        }
Exemplo n.º 4
0
 public void SetReferences()
 {
     sel       = GetComponentInParent <SelectableCtrl> ();
     sel.aggPA = this;
     _mov      = sel.mov;
 }