Пример #1
0
 private CraftDatabase(TextAsset craftDataBaseJson)
 {
     instance = JsonUtility.FromJson <CraftDatabase>(craftDataBaseJson.text);
     foreach (Craft craft in instance.database)
     {
         craft.SetSprite();
     }
 }
Пример #2
0
    /// <summary>
    /// instantiate item and slot list.
    /// </summary>
    void Start()
    {
        database  = CraftDatabase.Instance(craftJSON);
        idatabase = ItemDatabase.Instance(itemJSON);



        for (int i = 0; i < database.database.Count; i++)
        {
            AddCraft(database.database[i].id);
        }
    }
Пример #3
0
    /// <summary>
    /// instantiate item and slot list.
    /// </summary>
    void Start()
    {
        database = CraftDatabase.Instance(craftJSON);
        ItemDatabase.GetInstance(out idatabase);

        for (int i = 0; i < database.database.Count; i++)
        {
            AddCraft(database.database[i].id);
        }

        int impS = Data.instance.GetComponentInChildren <BaseStats>().printerStat;

        for (int t = 0; t < recipePanel.Length; t++)
        {
            recipePanel[t].SetActive(false);
        }
        for (int i = 0; i < impS && i < recipePanel.Length; i++)
        {
            recipePanel[i].SetActive(true);
        }
    }