Example #1
0
    private Sprite GetSprite(food Food)
    {
        Sprite result = null;

        foreach (recipeIngredent item in accepts)
        {
            if (item.foodTYPE == Food.type && item.foosSTATUS == Food.GetStatus())
            {
                if (solutin2 == 0)
                {
                    result    = item.icon;
                    solutin2 += 1;
                    one       = item.foodTYPE;
                    resultado();
                }
                else if (solutin2 == 1)
                {
                    result    = item.icon;
                    solutin2 += 1;
                    two       = item.foodTYPE;
                    resultado2();
                }
                else if (solutin2 == 2)
                {
                    result   = item.icon;
                    solutin2 = 0;
                    three    = item.foodTYPE;
                    resultado3();
                }
                break;
            }
        }

        return(result);
    }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (isChooping)
     {
         currentFood.processFood(Time.deltaTime);
         if (currentFood.GetStatus() != foodStatus.RAW)
         {
             isChooping = false;
         }
     }
 }
Example #3
0
 public bool StartChooping()
 {
     if (choppingHolder.HasMovable())
     {
         movableObject movable = choppingHolder.GetMovable();
         currentFood = movable.GetComponent <food>();
         if (currentFood != null && currentFood.GetStatus() == foodStatus.RAW)
         {
             isChooping = true;
             cut.Play();
         }
     }
     return(isChooping);
 }
Example #4
0
    protected Material GetMaterial(food Food)
    {
        Material result = null;

        foreach (recipeIngredent item in accepts)
        {
            if (item.foodTYPE == Food.type && item.foosSTATUS == Food.GetStatus())
            {
                result = item.soupMaterial;
                break;
            }
        }

        return(result);
    }
Example #5
0
    public bool CanAccept(food Food)
    {
        bool result = false;

        if (contentFood.Count < 5)
        {
            foreach (recipeIngredent item in accepts)
            {
                if (item.foodTYPE == Food.type && item.foosSTATUS == Food.GetStatus())
                {
                    result = true;
                    break;
                }
            }
        }

        return(result);
    }