Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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();
    }
Ejemplo n.º 3
0
    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;
        }
    }
Ejemplo n.º 4
0
 private void DeactiveSpawnedObject(BasePoolObject obj)
 {
     obj.OnDeactivation -= DeactiveSpawnedObject;
     ActiveSpawnedObjects.Remove(obj);
 }
Ejemplo n.º 5
0
 private void HandleEnemyDeactivation(BasePoolObject destroyedEnemy)
 {
     destroyedEnemy.OnDeactivation -= HandleEnemyDeactivation;
     DecreaseEnemyCount();
     HandleCheckLevelEnd();
 }
Ejemplo n.º 6
0
 private void HandleEnemyDeactivationDetachEvents(BasePoolObject destroyedEnemy)
 {
     destroyedEnemy.OnDeactivation -= HandleEnemyDeactivation;
 }
Ejemplo n.º 7
0
 private void HandleEnemySpawn(BasePoolObject spawnedEnemy)
 {
     spawnedEnemy.OnDeactivation += HandleEnemyDeactivation;
 }