Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 public static Sprite GetMaterialSubTypeIcon(MaterialSubType subtype)
 {
     return(Utility.LoadSprite(subtype.TypeIcon));
 }
Ejemplo n.º 4
0
 public static string GetMaterialSubTypeDesc(MaterialSubType subtype)
 {
     return(MultiLanguage.Instance.GetTextValue(subtype.TypeDesc));
 }
Ejemplo n.º 5
0
 public void InitSubTag(MaterialSubType type)
 {
     icon.sprite = MaterialModule.GetMaterialSubTypeIcon(type);
     Name.text   = MaterialModule.GetMaterialSubTypeName(type);
     subType     = type;
 }