示例#1
0
    public void ReloadFireArm()
    {
        try
        {
            FireArm fa = (FireArm)inHand;

            Magazine mag = _equipmentManager.ammoReserve.GetMagazine(fa.projectileType);

            if (mag)
            {
                fa.Reload(new object[] { mag, transform.position });
            }
            else
            {
                Debug.Log("There are no magazines of the type " + fa.projectileType + " in the reserves");
            }

            Debug.Log("Reload");
        }
        catch (InvalidCastException) {
            Debug.Log("The item in hand is not a FireArm");
        }
    }
示例#2
0
 public void Reload()
 {
     fireArm.Reload();
 }