private void OnTriggerExit(Collider other) { if (LogicUtils.IsPlayer(other) == false) { return; } StopSpawning(); }
private void OnTriggerEnter(Collider other) { if (LogicUtils.IsPlayer(other) == false) { return; } PlayerEntity player = other.GetComponent <PlayerEntity>(); player.onEntityDeath -= StopSpawning; player.onEntityDeath += StopSpawning; StartCoroutine(StartSpawning()); }