public void ServerRespawnPicked(Bonus bonus) { var respawnTask = _respawnTasks[bonus.transform.position]; respawnTask.TimeRemaining = _settings.RespawnIfPickedSeconds; _pool.Despawn(bonus); }
private void UnspawnHandler(GameObject spawned) { if (spawned.activeInHierarchy) { _pool.Despawn(spawned.GetComponent <Bonus>()); } }