Esempio n. 1
0
    private Sprite GetSprite(Recipy.Ingredient ingredient)
    {
        switch (ingredient)
        {
        case Recipy.Ingredient.MoonPotato:
            return(moonpotato);

        case Recipy.Ingredient.BlazerIce:
            return(blazer);

        case Recipy.Ingredient.RedMoonberry:
            return(redmoonberry);

        case Recipy.Ingredient.VoidOrange:
            return(voidorange);

        case Recipy.Ingredient.CosmicLiqueur:
            return(cosmicliqure);

        case Recipy.Ingredient.SpaceLemon:
            return(spacelemon);

        case Recipy.Ingredient.StarDirt:
            return(stardirt);

        case Recipy.Ingredient.ChemiBloom:
            return(chemibloom);

        case Recipy.Ingredient.InfernalWine:
            return(infernalwine);
        }
        return(null);
    }
    public void AddIngredient(string ingredient)
    {
        shake = shake / 2;
        Recipy.Ingredient ingredientOut = Recipy.Ingredient.BlazerIce;
        switch (ingredient)
        {
        case "Moon Potato":
            ingredientOut = Recipy.Ingredient.MoonPotato;
            money        -= prices[Recipy.Ingredient.MoonPotato];
            break;

        case "Blazar Ice":
            ingredientOut = Recipy.Ingredient.BlazerIce;
            money        -= prices[Recipy.Ingredient.BlazerIce];
            break;

        case "Red Moonberry":
            ingredientOut = Recipy.Ingredient.RedMoonberry;
            money        -= prices[Recipy.Ingredient.RedMoonberry];
            break;

        case "Void Orange":
            ingredientOut = Recipy.Ingredient.VoidOrange;
            money        -= prices[Recipy.Ingredient.VoidOrange];
            break;

        case "Cosmic Liqueur":
            ingredientOut = Recipy.Ingredient.CosmicLiqueur;
            money        -= prices[Recipy.Ingredient.CosmicLiqueur];
            break;

        case "Space Lemon":
            ingredientOut = Recipy.Ingredient.SpaceLemon;
            money        -= prices[Recipy.Ingredient.SpaceLemon];
            break;

        case "Star Dirt":
            ingredientOut = Recipy.Ingredient.StarDirt;
            money        -= prices[Recipy.Ingredient.StarDirt];
            break;

        case "Chemi Bloom":
            ingredientOut = Recipy.Ingredient.ChemiBloom;
            money        -= prices[Recipy.Ingredient.ChemiBloom];
            break;

        case "Infernal Wine":
            ingredientOut = Recipy.Ingredient.InfernalWine;
            money        -= prices[Recipy.Ingredient.InfernalWine];
            break;
        }
        if (currentMix.ContainsKey(ingredientOut))
        {
            currentMix[ingredientOut] += 1;
        }
        else
        {
            currentMix.Add(ingredientOut, 1);
        }
        Debug.Log("Added" + ingredientOut.ToString());
    }