public void ResetDefenderIsEngagedAsMainOrNoneTarget() //Called when rally point is updated/Changed from the scrDefenderMovement class { thisDefenderIsEngagedAsMainTarget = false; thisDefenderIsEngagedAsNoneTarget = false; if (CurrentCreepTarget != null) { CurrentCreepTarget.GetComponent <scrCreepEngagementHandler>().RemoveDefenderFromList(this); //Remove this defender from creep targets list CurrentCreepTarget = null; } }
public void DefenderEngageNewTargetAsMain(DefenderEngagementHandler _defender, Creep _target) { if (_defender != this || _target == null || !defenderTowerTargets.DefenderCreepList.Contains(_target)) { print("Was attempting to engage target, but it dissapeared..."); CurrentCreepTarget = null; LookForNewTarget(); return; } if (CurrentCreepTarget != null) { CurrentCreepTarget.GetComponent <scrCreepEngagementHandler>().RemoveDefenderFromList(this); } thisDefenderIsEngagedAsMainTarget = true; thisDefenderIsEngagedAsNoneTarget = false; InformCreepTarget(_target); }