Ejemplo n.º 1
0
    private void Shoot()
    {
        GameObject bulletGO = (GameObject)Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);

        TankBullet bullet = bulletGO.GetComponent <TankBullet>();

        if (bullet != null)
        {
            bullet.Seek(target);
        }
    }
Ejemplo n.º 2
0
    void Shoot()
    {
        GameObject bulletGO = (GameObject)Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
        TankBullet bullet   = bulletGO.GetComponent <TankBullet>();

        if (bullet == null)
        {
            return;
        }
        bullet.Seek(target);
        GameManager.instance.soundManager.PlaySound("FuturisticWeaponsSet/hand_gun/shot_hand_gun");
    }