void Highlight(KitchenPhase phase)
 {
     ReturnToScale();
     if (phase == KitchenPhase.Fridge)
     {
         fridge.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
     }
     else if (phase == KitchenPhase.Exit)
     {
         exit.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
     }
     else if (phase == KitchenPhase.AutoCauldron)
     {
         autoCauldron.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
     }
     else if (phase == KitchenPhase.ManuCauldron)
     {
         manuCauldron.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
     }
     else if (phase == KitchenPhase.NoticeBoard)
     {
         noticeBoard.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
     }
     else
     {
         ReturnToScale();
     }
 }
Beispiel #2
0
 void RunPhase(KitchenPhase phase)
 {
     if (phase == KitchenPhase.None)
     {
         Debug.Log("phase NONE");
     }
     else if (phase == KitchenPhase.Exit)
     {
         exitUI.enabled = true;
         print("Running Exit");
     }
     else if (phase == KitchenPhase.Fridge)
     {
         fridgeUI.enabled = true;
         print("Running Fridge");
     }
     else if (phase == KitchenPhase.ManuCauldron)
     {
         manuCauldronUI.enabled = true;
         print("Running Manual Cauldron");
     }
     else if (phase == KitchenPhase.AutoCauldron)
     {
         autoCauldronUI.enabled = true;
         print("Running AutomaticCauldron");
     }
     else if (phase == KitchenPhase.NoticeBoard)
     {
         noticeBoardUI.enabled = true;
         print("Running noticeboard");
     }
     else
     {
         Debug.Log("No Kitchenphase atm");
     }
 }
Beispiel #3
0
 // Update is called once per frame
 void Update()
 {
     if (currentPhase == KitchenPhase.None)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             currentPhase = KitchenPhase.Exit;
             phaseChange(KitchenPhase.Exit);
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             currentPhase = KitchenPhase.Fridge;
             phaseChange(KitchenPhase.Fridge);
         }
     }
     else if (currentPhase == KitchenPhase.Fridge)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             currentPhase = KitchenPhase.Exit;
             phaseChange(KitchenPhase.Exit);
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             currentPhase = KitchenPhase.AutoCauldron;
             phaseChange(KitchenPhase.AutoCauldron);
         }
     }
     else if (currentPhase == KitchenPhase.AutoCauldron)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             currentPhase = KitchenPhase.Fridge;
             phaseChange(KitchenPhase.Fridge);
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             if (manualEnabled == true)
             {
                 currentPhase = KitchenPhase.ManuCauldron;
                 phaseChange(KitchenPhase.ManuCauldron);
             }
             else
             {
                 currentPhase = KitchenPhase.NoticeBoard;
                 phaseChange(KitchenPhase.NoticeBoard);
             }
         }
     }
     else if (currentPhase == KitchenPhase.ManuCauldron)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             currentPhase = KitchenPhase.AutoCauldron;
             phaseChange(KitchenPhase.AutoCauldron);
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             currentPhase = KitchenPhase.NoticeBoard;
             phaseChange(KitchenPhase.NoticeBoard);
         }
     }
     else if (currentPhase == KitchenPhase.NoticeBoard)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             if (manualEnabled == true)
             {
                 currentPhase = KitchenPhase.ManuCauldron;
                 phaseChange(KitchenPhase.ManuCauldron);
             }
             else
             {
                 currentPhase = KitchenPhase.AutoCauldron;
                 phaseChange(KitchenPhase.AutoCauldron);
             }
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             currentPhase = KitchenPhase.Exit;
             phaseChange(KitchenPhase.Exit);
         }
     }
     else if (currentPhase == KitchenPhase.Exit)
     {
         if (Input.GetKeyDown(KeyCode.D))
         {
             currentPhase = KitchenPhase.NoticeBoard;
             phaseChange(KitchenPhase.NoticeBoard);
         }
         else if (Input.GetKeyDown(KeyCode.A))
         {
             currentPhase = KitchenPhase.Fridge;
             phaseChange(KitchenPhase.Fridge);
         }
     }
 }
Beispiel #4
0
 void OnEnable()
 {
     currentPhase = KitchenPhase.None;
     run.enabled  = true;
 }