Esempio n. 1
0
    public bool SetPart(WeaponPart newPart)
    {
        if (newPart != null && newPart.partType != slotType)
        {
            return(false);
        }


        if (part != null)
        {
            part.Unload();
        }

        part = newPart;

        if (part != null)
        {
            part.Load(transform);
        }

        if (SceneManager.GetActiveScene().name == "WeaponCustomization")
        {
            UiWeaponStats.UpdateStats();
        }

        return(true);
    }