Exemple #1
0
        private void Despawn(SpawnableObject spawnableObject)
        {
            spawnableObject.Deactivated -= OnObjectDeactivated;

            _activeObjects.Remove(spawnableObject);
            _objectsPool.Return(spawnableObject);
        }
Exemple #2
0
 private void OnObjectDeactivated(SpawnableObject spawnableObject)
 {
     Despawn(spawnableObject);
 }