Beispiel #1
0
    //Call these Functions from the player controller to use your weapons

    public void Shoot(Vector3 position, Vector3 direction)
    {
        if (_equippedGun == null)
        {
            return;
        }
        var fired = _equippedGun.TryShoot(ref position, ref direction);

        if (fired == null)
        {
            return;
        }
        FireBullet(fired._prefab, position, fired._bulletVelocity * direction);
    }