IEnumerator DestroyBullet(MisilHero bullet) { yield return(new WaitForSeconds(2f)); Instantiate(particleEffect, this.transform.position, Quaternion.identity); _bulletPool.ReturnBulletToPool(bullet); }
public static void DisposeBullet(MisilHero bullet) { bullet.Dispose(); bullet.gameObject.SetActive(false); }
public static void InitializeBullet(MisilHero bullet) { bullet.gameObject.SetActive(true); bullet.Initialize(); }
public void ReturnBulletToPool(MisilHero bullet) { heroPosition = GetComponent <Transform>().position; bullet.transform.position = heroPosition; _misiltPool.DisablePoolObject(bullet); }