public void AssemblePartTypeSetUnlock(string type, bool unlock) { Config.AssemblePartMainType typeData = null; AssemblePartMainTypeDic.TryGetValue(type, out typeData); if (typeData != null) { typeData.DefaultUnlock = unlock; } }
/// <summary> /// Ship Part Tab /// </summary> /// <param name="partTypeData"></param> public void SetUpTab(Config.AssemblePartMainType partTypeData, bool isDesignPage) { _btn.onClick.RemoveAllListeners(); if (partTypeData != null) { Type = partTypeData.Type; _icon.sprite = Utility.LoadSprite(partTypeData.IconPath); _text.text = MultiLanguage.Instance.GetTextValue(partTypeData.TypeName); _btn.onClick.AddListener(() => OnPartBtnClick(isDesignPage)); } }