public MaterialInfo(int id) { material = MaterialModule.GetMaterialByMaterialID(id); if (material != null) { ID = id; dataModel = new MaterialDataModel(); dataModel.Create(ID); mainType = MaterialModule.GetMaterialType(id); subType = MaterialModule.GetMaterialSubType(id); } }
public override void Construction() { AllMaterialList = new List <Material>(); for (int i = 0; i < 2; i++) { Material mat = new Material(); mat.MaterialID = i; mat.MaterialName = ""; mat.NameEn = ""; mat.MaterialDesc = ""; mat.Type = ""; mat.SubType = ""; mat.BlockCapacity = (ushort)i; mat.PriceBase = i; mat.MaterialIcon = ""; mat.BG = ""; mat.UnitName = ""; mat.Rarity = (ushort)i; mat.ModelPath = ""; AllMaterialList.Add(mat); } AllMaterialTypeList = new List <MaterialType>(); for (int i = 0; i < 2; i++) { MaterialType type = new MaterialType(); type.Type = ""; type.DefaultShow = true; type.TypeName = ""; type.TypeDesc = ""; type.TypeIcon = ""; type.SubTypeList = ""; AllMaterialTypeList.Add(type); } AllMaterialSubTypeList = new List <MaterialSubType>(); for (int i = 0; i < 2; i++) { MaterialSubType type = new MaterialSubType(); type.SubType = ""; type.DefaultShow = true; type.TypeName = ""; type.TypeDesc = ""; type.TypeIcon = ""; AllMaterialSubTypeList.Add(type); } }
public static Sprite GetMaterialSubTypeIcon(MaterialSubType subtype) { return(Utility.LoadSprite(subtype.TypeIcon)); }
public static string GetMaterialSubTypeDesc(MaterialSubType subtype) { return(MultiLanguage.Instance.GetTextValue(subtype.TypeDesc)); }
public void InitSubTag(MaterialSubType type) { icon.sprite = MaterialModule.GetMaterialSubTypeIcon(type); Name.text = MaterialModule.GetMaterialSubTypeName(type); subType = type; }