private void SpawnOneLittleAsteroid() { BasePoolObject basePoolObject = PoolManager.Instance.GetPoolObject(TagManager.TagsEnum.LITTLE_ASTEROID_TAG, this.transform.position, this.transform.rotation); Asteroid littleAsteroid = basePoolObject as Asteroid; littleAsteroid.SetIsBreakable(false); }
public void Spawn() { BasePoolObject basePoolObject = PoolManager.Instance.GetPoolObject(PoolObjectTag, this.transform.position, this.transform.rotation); basePoolObject.OnDeactivation += DeactiveSpawnedObject; CurrentSpawnedObjectNumber++; ActiveSpawnedObjects.Add(basePoolObject); OnSpawn(basePoolObject); HandleSpawnEnd(); }
private void EjectBullet() { if (PoolManager.Instance != null) { BasePoolObject poolObject = PoolManager.Instance.GetPoolObject(bulletTag, BulletSpawnPoint.position, BulletSpawnPoint.rotation); Bullet bullet = poolObject as Bullet; bullet.OnKillTarget += CachedPlayerShootingController.NotifyKillEnemy; } }
private void DeactiveSpawnedObject(BasePoolObject obj) { obj.OnDeactivation -= DeactiveSpawnedObject; ActiveSpawnedObjects.Remove(obj); }
private void HandleEnemyDeactivation(BasePoolObject destroyedEnemy) { destroyedEnemy.OnDeactivation -= HandleEnemyDeactivation; DecreaseEnemyCount(); HandleCheckLevelEnd(); }
private void HandleEnemyDeactivationDetachEvents(BasePoolObject destroyedEnemy) { destroyedEnemy.OnDeactivation -= HandleEnemyDeactivation; }
private void HandleEnemySpawn(BasePoolObject spawnedEnemy) { spawnedEnemy.OnDeactivation += HandleEnemyDeactivation; }