Exemplo n.º 1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Time.timeScale = 0;
            UIType uitype = UIManager.getInstance().getCurrentUIType();
            Debug.Log(uitype);
            switch (uitype)
            {
            case UIType.MainMenu:
                break;

            case UIType.EquipKnow:
                if (UIManager.getInstance().equipKnowUI.currentTrainMode == TrainUI.TrainMode.Exam)
                {
                    uiCamera.depth = 50;
                    UIManager.getInstance().equipKnowUI.gameObject.SetActive(false);
                    exitExam.setActiveSwitchMode(true);
                    exitExam.setYesSwitchClick(OnEquipKnowUIClick);
                    return;
                }
                break;

            case UIType.TrainUI:
                if (UIManager.getInstance().trainUI.currentTrainMode == TrainUI.TrainMode.Exam && UIManager.getInstance().trainUI.isStartTrain == true)
                {
                    Time.timeScale = 1;
                    UIManager.getInstance().trainUI.tabStrip.tabs[0].GetComponent <UIButton>().SetState(UIButtonColor.State.Pressed, false);
                    UIManager.getInstance().trainUI.tabStrip.tabs[0].GetComponent <UIToggle>().Set(true);
                    return;
                }
                break;

            case UIType.CircuitUI:
                if (UIManager.getInstance().circuitUI.currentTrainMode == TrainUI.TrainMode.Exam && UIManager.getInstance().circuitUI.circuitUIIsStart == true)
                {
                    exitExam.setActiveSwitchMode(true);
                    exitExam.setYesSwitchClick(OnCircuitExamClick);
                    return;
                }
                break;

            case UIType.GuideUI:
                break;
            }
            back.setBackHighLevelActive(true);
        }
    }
Exemplo n.º 2
0
 public void onTabCilck(GameObject obj)
 {
     if (multimeter != null)
     {
         multimeter.GetComponent <UIPanel>().enabled = false;
     }
     popWindow.setActiveSwitchMode(true);
     if (obj.name.Equals("study_tab"))
     {
         tempMode = TrainUI.TrainMode.Study;
     }
     else if (obj.name.Equals("exam_tab"))
     {
         tempMode = TrainUI.TrainMode.Exam;
     }
 }
Exemplo n.º 3
0
 public void onTabCilck(GameObject obj)
 {
     popWindow.setActiveSwitchMode(true);
     if (obj.name.Equals("study_tab"))
     {
         tempMode = TrainUI.TrainMode.Study;
     }
     else if (obj.name.Equals("practice_tab"))
     {
         tempMode = TrainUI.TrainMode.Training;
     }
     else if (obj.name.Equals("exam_tab"))
     {
         tempMode = TrainUI.TrainMode.Exam;
     }
 }
Exemplo n.º 4
0
 public void onTabClick(GameObject obj)
 {
     string [] name = obj.name.Split('_');
     change.setActiveSwitchMode(true);
     if (name[0].Equals("study"))
     {
         tempMode = TrainUI.TrainMode.Study;
     }
     else if (name[0].Equals("exam"))
     {
         tempMode = TrainUI.TrainMode.Exam;
     }
 }