Ejemplo n.º 1
0
 /*=====================================================
  *  食材が触れていてプレイヤーから手放されたら読み込まれる
  *  OnTriggerStayに依存
  * ====================================================*/
 public void LeadFood(GameObject getFood)
 {
     if (getFood.gameObject.tag == "rice")
     {
         OpScript.FoodKind(Foodselect1.RICE);
         OpScript.CookKind(OperatorController.FryingPan);
         Debug.Log("米!!");
         FoodNameRice(getFood);
         getFood.gameObject.SetActive(false);
     }
     else if (getFood.gameObject.tag == "egg")
     {
         OpScript.FoodKind(Foodselect1.EGG);
         OpScript.CookKind(OperatorController.FryingPan);
         Debug.Log("タメェイゴォ");
         FoodNameEgg(getFood);
         getFood.gameObject.SetActive(false);
     }
     else if (getFood.gameObject.tag == "tmt")
     {
         OpScript.FoodKind(Foodselect1.TOMATO);
         OpScript.CookKind(OperatorController.FryingPan);
         Debug.Log("トメェイトォウ");
         FoodNameTomato(getFood);
         getFood.gameObject.SetActive(false);
     }
 }
Ejemplo n.º 2
0
 void CutFood()
 {
     if (!food)
     {
         Debug.Log("No FoodMaterial");
         CBMiss.Play();
     }
     else if (food.gameObject.tag == "rice")
     {
         OpScript.FoodKind(Foodselect1.RICE);
         OpScript.CookKind(OperatorController.CuttingBoard);
         Debug.Log("切れないッシュ!!");
         Reset();
     }
     else if (food.gameObject.tag == "tmt")
     {
         OpScript.FoodKind(Foodselect1.TOMATO);
         OpScript.CookKind(OperatorController.CuttingBoard);
         Debug.Log("サラダぁ...");
         StartCoroutine("CookSarada");
     }
     else if (food.gameObject.tag == "egg")
     {
         OpScript.FoodKind(Foodselect1.EGG);
         OpScript.CookKind(OperatorController.CuttingBoard);
         Debug.Log("切れると思ってんの?");
         Reset();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 鍋に入れる
 /// </summary>
 /// <param name="food">食べ物</param>
 public void SetFood(GameObject food)
 {
     // if (!Full)
     {
         if (food.gameObject.tag == "egg")
         {
             for (int i = 0; i < 3; i++)
             {
                 if (PotArray[i] == null)
                 {
                     OpScript.FoodKind(Foodselect1.EGG);
                     OpScript.CookKind(OperatorController.Pot);
                     PotArray[i] = food;
                     break;
                 }
             }
         }
         else if (food.gameObject.tag == "tmt")
         {
             for (int i = 0; i < 3; i++)
             {
                 if (PotArray[i] == null)
                 {
                     OpScript.FoodKind(Foodselect1.TOMATO);
                     OpScript.CookKind(OperatorController.Pot);
                     PotArray[i] = food;
                     break;
                 }
             }
         }
         else if (food.gameObject.tag == "rice")
         {
             for (int i = 0; i < 3; i++)
             {
                 if (PotArray[i] == null)
                 {
                     OpScript.FoodKind(Foodselect1.RICE);
                     OpScript.CookKind(OperatorController.Pot);
                     PotArray[i] = food;
                     break;
                 }
             }
         }
     }
 }