예제 #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();
        }
예제 #2
0
파일: Unit.cs 프로젝트: horato/IntWarsSharp
        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();
        }