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