Ejemplo n.º 1
0
        protected override void FireAction()
        {
            //BaseAmmo bullet = Instantiate(bulletPrefab);
            BaseAmmo bullet = ObjectsPool.Instance.GetObject(BulletID) as BaseAmmo;

            bullet.Initialize(ShootForce, firepoint);
        }
        protected override void FireAction()
        {
            if (countBulletsInWeapon <= 0)
            {
                return;
            }

            BaseAmmo bullet = ObjectsPool.Instance.GetObject(ammoID) as BaseAmmo;

            bullet.Initialize(shootForce, firepoint);

            fireParticle.Play();

            anim.SetBool("isFire", true);

            countBulletsInWeapon--;
        }