private void RemoveDeadCreepFromList(Creep _creep) //If the creep that died is in the current list... { if (DefenderCreepList.Contains(_creep)) { DefenderCreepList.Remove(_creep); //Remove it } }
public void LooseTargetReferenceFromRallyPoint(GameObject other) { Creep theCreep = other.GetComponent <Creep>(); if (DefenderCreepList.Contains(theCreep)) { LooseDefenderTarget?.Invoke(theCreep, Defenders); DefenderCreepList.Remove(theCreep); } //print("Lost a creep reference: " + other); }