Beispiel #1
0
 private void Awake()
 {
     if (instance != null)
     {
         Debug.LogWarning("More than one instance of crafting ingredients found");
         return;
     }
     instance = this;
 }
    string SortItemString()
    {
        TakeInResource ingredients = materialpanel.GetComponent <TakeInResource>();

        if (ingredients.items.Count == 1)
        {
            return(ingredients.items[0].title);
        }
        else if (ingredients.items.Count == 2)
        {
            return(ingredients.items[0].title + ingredients.items[1].title);
        }
        else if (ingredients.items.Count == 3)
        {
            return(ingredients.items[0].title + ingredients.items[1].title + ingredients.items[2].title);
        }
        else
        {
            return("None");
        }
    }