Exemplo n.º 1
0
    private void Fire()
    {
        GameObject bulletPre = Instantiate(bulletPrefab) as GameObject;
        Bullet     bullet    = bulletPre.GetComponent <Bullet>();



        bullet.transform.position = transform.position;
        bullet.ApplyForse(thrustDirection);
        AudioManager.Play(AudioClipName.PlayerShot);
    }