Esempio n. 1
0
    /// <summary>
    /// Try to call Primary use for weapon (Will call main hand primary if not wearing offhand weapon)
    /// </summary>
    /// <param name="weapon">0 : main hand, 1 : off hand</param>
    public void EndPrimary(int weapon)
    {
        if (offHandWeapon != null && weapon != 0)
        {
            offHandWeapon.EndPrimary();
            ohPrimaryEnabled = false;

            PlayEndPrimarySoundOffHand();
        }
        else if (mainHandWeapon != null)
        {
            mainHandWeapon.EndPrimary();
            mhPrimaryEnabled = false;

            PlayEndPrimarySound();
        }
    }