Example #1
0
        public void setTargetUnit(Unit target)
        {
            if (target == null)                       // If we are unsetting the target (moving around)
            {
                if (targetUnit != null)               // and we had a target
                {
                    targetUnit.setDistressCall(null); // Unset the distress call
                }
                // TODO: Replace this with a delay?
            }
            else
            {
                target.setDistressCall(this); // Otherwise set the distress call
            }

            targetUnit = target;
            refreshWaypoints();
        }
Example #2
0
        public void setTargetUnit(Unit target)
        {
            if (target == null) // If we are unsetting the target (moving around)
            {
                if (targetUnit != null) // and we had a target
                    targetUnit.setDistressCall(null); // Unset the distress call	
                                                      // TODO: Replace this with a delay?
            }
            else
            {
                target.setDistressCall(this); // Otherwise set the distress call
            }

            targetUnit = target;
            refreshWaypoints();
        }