Example #1
0
 public void ResetInfo()
 {
     selectIngrInfo       = null;
     FoodName.text        = null;
     FoodDescription.text = null;
     FoodRarity.text      = null;
     FoodGrade.text       = null;
     FoodCatagory.text    = null;
     FoodPic.SetActive(false);
     FreshnessIcon.SetActive(false);
     MainAbilityDiscription.text   = null;
     SecondAbilityDiscription.text = null;
     //FoodInfoCard.SetActive(false);
 }
Example #2
0
 public void DisplayFoodInfo()
 {
     //FoodInfoCard.SetActive(false);
     selectIngrInfo       = selectedIngredient.GetComponent <IngredientSlotMachine>().ingredient;
     FoodName.text        = selectIngrInfo.IngredientName;
     FoodDescription.text = selectIngrInfo.IngredientDesciption;
     FoodRarity.text      = selectIngrInfo.IngredientTier;
     FoodGrade.text       = selectIngrInfo.IngredientQuality.ToString();
     FoodCatagory.text    = selectIngrInfo.IngredientCatagory;
     FoodPic.GetComponent <Image>().sprite = selectIngrInfo.IngredientImage;
     FreshnessIcon.SetActive(true);
     FoodPic.SetActive(true);
     MainAbilityDiscription.text   = selectIngrInfo.MainAbility;
     SecondAbilityDiscription.text = selectIngrInfo.SecondAbility;
     //FoodInfoCard.SetActive(true);
 }
Example #3
0
    void AssignIngr()
    {
        if (Random.value > 0.2)       //80% chance
        {
            if (Random.value >= 0.5)  //50% chance
            {
                if (Random.value > 0) //70% chance
                {
                    ingredient = GM.current.Ve1;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ve1.IngredientImage;
                }
                if (Random.value > 0.8) //50% chance
                {
                    ingredient = GM.current.Ve2;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ve2.IngredientImage;
                }
                if (Random.value > 0.95) //20% chance
                {
                    ingredient = GM.current.Ve3;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ve3.IngredientImage;
                }
            }
            if (Random.value < 0.5)
            {
                if (Random.value > 0) //70% chance
                {
                    ingredient = GM.current.Fr1;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fr1.IngredientImage;
                }
                if (Random.value > 0.8) //50% chance
                {
                    ingredient = GM.current.Fr2;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fr2.IngredientImage;
                }
                if (Random.value > 0.95) //20% chance
                {
                    ingredient = GM.current.Fr3;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fr3.IngredientImage;
                }
            }
        }

        if (Random.value > 0.5) //50% chance
        {
            if (Random.value >= 0.5)
            {
                if (Random.value > 0) //70% chance
                {
                    ingredient = GM.current.Me1;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Me1.IngredientImage;
                }
                if (Random.value > 0.8) //50% chance
                {
                    ingredient = GM.current.Me2;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Me2.IngredientImage;
                }
                if (Random.value > 0.95) //20% chance
                {
                    ingredient = GM.current.Me3;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Me3.IngredientImage;
                }
            }
            if (Random.value < 0.5)
            {
                if (Random.value > 0) //70% chance
                {
                    ingredient = GM.current.Fi1;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fi1.IngredientImage;
                }
                if (Random.value > 0.8) //50% chance
                {
                    ingredient = GM.current.Fi2;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fi2.IngredientImage;
                }
                if (Random.value > 0.95) //20% chance
                {
                    ingredient = GM.current.Fi3;
                    gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Fi3.IngredientImage;
                }
            }
        }

        if (Random.value > 0.7)   //30% chance
        {
            if (Random.value > 0) //70% chance
            {
                ingredient = GM.current.Ce1;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ce1.IngredientImage;
            }
            if (Random.value > 0.8) //50% chance
            {
                ingredient = GM.current.Ce2;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ce2.IngredientImage;
            }
            if (Random.value > 0.95) //20% chance
            {
                ingredient = GM.current.Ce3;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Ce3.IngredientImage;
            }
        }

        if (Random.value > 0.9)   //10% chance
        {
            if (Random.value > 0) //70% chance
            {
                ingredient = GM.current.Da1;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Da1.IngredientImage;
            }
            if (Random.value > 0.8) //50% chance
            {
                ingredient = GM.current.Da2;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Da2.IngredientImage;
            }
            if (Random.value > 0.95) //20% chance
            {
                ingredient = GM.current.Da3;
                gameObject.GetComponent <SpriteRenderer>().sprite = GM.current.Da3.IngredientImage;
            }
        }
    }