Esempio n. 1
0
    public void RemoveMeal(FoodObjectScript meal)
    {
        meals.Remove(meal);

        if (OnMealChangedCallback != null)
        {
            OnMealChangedCallback.Invoke();
        }
    }
Esempio n. 2
0
    public void RemoveIngredient(FoodObjectScript ingredient)
    {
        ingredients.Remove(ingredient);

        if (OnIngredientChangedCallback != null)
        {
            OnIngredientChangedCallback.Invoke();
        }
    }
Esempio n. 3
0
    //adding Meal to ingredient inventory
    public bool AddMeal(FoodObjectScript meal)
    {
        if (meals.Count >= mealSpace)
        {
            Debug.Log("out of room");
            return(false);
        }

        meals.Add(meal);

        if (OnMealChangedCallback != null)
        {
            OnMealChangedCallback.Invoke();
        }

        return(true);
    }
Esempio n. 4
0
    //adding ingredients to ingredient inventory
    public bool AddIngredient(FoodObjectScript ingredient)
    {
        if (ingredients.Count >= ingredientSpace)
        {
            Debug.Log("out of room");
            return(false);
        }

        ingredients.Add(ingredient);

        if (OnIngredientChangedCallback != null)
        {
            OnIngredientChangedCallback.Invoke();
        }

        return(true);
    }
 public void ClearMealSlot()
 {
     meal         = null;
     icon.enabled = false;
 }
 public void ClearIngredientSlot()
 {
     ingredient   = null;
     icon.enabled = false;
 }
 public void AddMeal(FoodObjectScript newMeal)
 {
     meal         = newMeal;
     icon.sprite  = meal.foodImage;
     icon.enabled = true;
 }
 public void AddIngredient(FoodObjectScript newIngredient)
 {
     ingredient   = newIngredient;
     icon.sprite  = ingredient.foodImage;
     icon.enabled = true;
 }
Esempio n. 9
0
 void Awake()
 {
     ingredient = GameMaster.current.IngredientVariety[(Random.Range(0, GameMaster.current.IngredientVariety.Length))];
 }