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); }
// Update is called once per frame void Update() { if (isChooping) { currentFood.processFood(Time.deltaTime); if (currentFood.GetStatus() != foodStatus.RAW) { isChooping = false; } } }
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); }
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); }
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); }