public void OnUnitDeath(NonControllableUnit unit) { enemyUnits.Remove(unit); if (enemyUnits.items.Count == 0 && lastWave) { Application.Quit();//TODO EventClear } }
private void OnTriggerEnter(Collider other) { Unit unit = other.gameObject.GetComponent <Unit>(); if (unit != null && unit.GetComponent <UnitHealth>().alive) { if (playerSide.items.Contains(unit)) { playerSide.Remove(unit); NPCSide.Add(unit); } else { NPCSide.Remove(unit); playerSide.Add(unit); } } }