Пример #1
0
 private bool MaxReached(ManaIngredients ingredientType)
 {
     if (m_ManaDictionary[ingredientType] == 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 public bool AddIngredient(ManaIngredients ingredientType)
 {
     if (MaxReached(ingredientType))
     {
         return(false);
     }
     else
     {
         m_ManaDictionary[ingredientType]--;
         return(true);
     }
 }
Пример #3
0
    private bool HandleIngredientAddition(ManaIngredients addedIngredient)
    {
        if (m_currentMana.AddIngredient(addedIngredient))
        {
            m_signsText[addedIngredient].text = m_currentMana.GetCountByIngredient(addedIngredient).ToString();
            m_scoreController.GoodIngredientAdded();

            //maybe do ssomething with the 3d object
            return(true);
        }
        else
        {
            m_scoreController.BadIngredientAdded();
            return(false);
        }
    }
Пример #4
0
 public int GetCountByIngredient(ManaIngredients ingredient)
 {
     return(m_ManaDictionary[ingredient]);
 }
Пример #5
0
 public bool AddIngredient(ManaIngredients addedIngredient)
 {
     return(HandleIngredientAddition(addedIngredient));
 }