// Called when one of the player units die private void PlayerUnitDied(LivingEntity a_unit) { if (a_unit.CompareTag("LightningUnit")) { lightningDead = true; } if (a_unit.CompareTag("EarthUnit")) { earthDead = true; } }
public void OnUnitSelected(LivingEntity entity) { if (entity == null) { return; } if (entity.CompareTag(friendlyTag)) { if (friendly != entity) { Debug.Log("Friendly Selected"); friendly = entity; controller = friendly.GetComponent <AgentController>(); } } }