Example #1
0
 public void enable_information(int level_no)
 {
     List_topic_screen.SetActive(false);
     Insturction_screen.SetActive(true);
     for (int i = 0; i < 8; i++)
     {
         information_Screen [i].SetActive(false);
     }
     information_Screen [level_no - 1].SetActive(true);
 }
Example #2
0
    public void mainmenu_btn_clicked(GameObject clicked)
    {
        switch (clicked.name)
        {
        case TUTORIAN_BTN:
            List_topic_screen.SetActive(true);
            Menu_screen.SetActive(false);
            break;

        case PROGRAM_BTN:
            Menu_screen.SetActive(false);
            List_of_topic_prgm_screen.SetActive(true);
            break;

        case QUIZ_BTN:
            Quiz_screen.SetActive(true);
            Menu_screen.SetActive(false);
            break;

        case SETTING_BTN:
            Setting_screen.SetActive(true);
            //Menu_screen.SetActive (false);
            break;

        case CREDITS_BTN:
            credits_screen.SetActive(true);
            break;

        case CREDITS_CLOSE_BTN:
            credits_screen.SetActive(false);
            break;

        case TOPIC_BACK:
            List_topic_screen.SetActive(false);
            Menu_screen.SetActive(true);
            break;

        case QUIT_YES_BTN:
            Application.Quit();
            break;

        case QUIT_NO_BTN:
            quit_screen.SetActive(false);
            quit_scrn_bool = false;
            break;
        }
    }
Example #3
0
    public void topic_button_clicks(GameObject topic_clicked)
    {
        switch (topic_clicked.name)
        {
        case INSTRUCTION_BTN:
            selected_method_no = 1;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_1", 1);

            break;

        case STRUCTURE_BTN:
            selected_method_no = 2;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_2", 1);
            break;

        case VARIABLES_BTN:
            selected_method_no = 3;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_3", 1);
            break;

        case INPUT_OUTPUT_BTN:
            selected_method_no = 4;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_4", 1);
            break;

        case FLOW_CONTROL_BTN:
            selected_method_no = 5;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_5", 1);
            break;

        case FUNCTION_BTN:
            selected_method_no = 6;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_6", 1);
            break;

        case ARRAY_BTN:
            selected_method_no = 7;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_7", 1);
            break;

        case FILE_IO_BTN:
            selected_method_no = 8;
            enable_information(selected_method_no);
            PlayerPrefs.SetInt("inst_8", 1);
            break;

        case CONTENT_BACK_BTN:
            List_topic_screen.SetActive(true);
            Insturction_screen.SetActive(false);
            break;

        case COMMENT_BACK_BTN:
            Insturction_screen.SetActive(true);
            PlayerPrefs.SetString("notes", Notes.text);
            Comment_screen.SetActive(false);

            break;

        case SETTING_BACK_BTN:
            Setting_screen.SetActive(false);
            //johny.. comment...
            if (!Quiz_screen.activeSelf)
            {
                SceneManager.LoadScene("mainmenu");
            }
            break;

        case QUIZ_BACK_BTN:
            Menu_screen.SetActive(true);
            Quiz_screen.SetActive(false);
            break;

        case COMMENT_BTN:
            Insturction_screen.SetActive(false);
            Comment_screen.SetActive(true);
            break;

        case BACK_BTN_PRGM:
            program_screen_menu.SetActive(false);
            List_of_topic_prgm_screen.SetActive(true);
            break;
        }
    }