Пример #1
0
    private void ShootS()
    {
        GameObject bullet = Instantiate(bulletPrefab, shootPos.position, shootPos.rotation);
        Rigidbody  rb     = bullet.GetComponent <Rigidbody>();

        rb.AddForce(shootPos.up * _arenaManager.GetBulletSpeed(), ForceMode.Impulse);
        transform.GetComponent <AudioSource>().PlayOneShot(ShootSound);
    }