Пример #1
0
    IEnumerator DestroyBullet(MisilHero bullet)
    {
        yield return(new WaitForSeconds(2f));

        Instantiate(particleEffect, this.transform.position, Quaternion.identity);
        _bulletPool.ReturnBulletToPool(bullet);
    }
Пример #2
0
 public static void DisposeBullet(MisilHero bullet)
 {
     bullet.Dispose();
     bullet.gameObject.SetActive(false);
 }
Пример #3
0
 public static void InitializeBullet(MisilHero bullet)
 {
     bullet.gameObject.SetActive(true);
     bullet.Initialize();
 }
Пример #4
0
 public void ReturnBulletToPool(MisilHero bullet)
 {
     heroPosition = GetComponent <Transform>().position;
     bullet.transform.position = heroPosition;
     _misiltPool.DisablePoolObject(bullet);
 }