Пример #1
0
 public void OnClick(RaycastHit hit, Transform t)
 {
     if (CheckForFood())
     {
         PlaceMarker m = i.AnyMarker(markers.ToList(), hit.point);
         if (!m.GetOccupation())
         {
             GameObject obj  = i.GetHolding().GetObject();
             Food_O     food = obj.GetComponent <Food_O>();
             if (!food.HasChild() && CheckScene())
             {
                 StartCoroutine(WaitToCook(food));
                 i.OnPutDown(m, null, true);
                 obj.transform.rotation = Quaternion.identity;
             }
         }
     }
 }
Пример #2
0
 public void ChangeInterface(Vector3 pos)
 {
     if (CheckForFood())
     {
         Food_O f = i.GetHolding().GetObject().GetComponent <Food_O>();
         if (f.HasChild())
         {
             i.SetUI(2, "");
         }
         else if (!CheckScene())
         {
             i.SetUI(2, GetName() + " is warming up");
         }
         else
         {
             i.SetUI(1, "Cook " + f.GetName());
         }
     }
     if (i.GetHolding() == null)
     {
         i.SetUI(3, "");
     }
 }