コード例 #1
0
    public void GoToPersonalData()
    {
        hidePanels();

        _user_interface.SetPersonalDataPanelVisibility(true);
        _play_scenario_state = Play_scenario_state.PREFERENCES;
    }
コード例 #2
0
    public void GoToChangeLanguage()
    {
        hidePanels();

        _user_interface.SetChangeLanguagePanelVisibility(true);
        _play_scenario_state = Play_scenario_state.PREFERENCES;
    }
コード例 #3
0
    public void GoToModalities()
    {
        hidePanels();

        _user_interface.SetChildLeftPanelVisibility(true);
        _user_interface.SetModalityPanelVisibility(true);
        _play_scenario_state = Play_scenario_state.MODALITY_MENU;
    }
コード例 #4
0
    public void GoToMainMenu()
    {
        hidePanels();

        _user_interface.SetChildLeftPanelVisibility(true);
        _user_interface.SetChildMainMenuVisibility(true);
        _play_scenario_state = Play_scenario_state.MAIN_MENU;
    }
コード例 #5
0
    public void GoToHeroes()
    {
        hidePanels();

        _user_interface.SetChildLeftPanelVisibility(true);
        _user_interface.SetHeroePanelVisibility(true);
        _play_scenario_state = Play_scenario_state.HEROE_MENU;
    }
コード例 #6
0
    public void GoToDisciplines()
    {
        hidePanels();

        _user_interface.SetChildLeftPanelVisibility(true);
        _user_interface.SetDisciplinePanelVisibility(true);
        _play_scenario_state = Play_scenario_state.DISCIPLINE_MENU;
    }
コード例 #7
0
    public void Refresh_button_currentselection()
    {
        state = play_and_learn_scenario._play_scenario_state;
        //State of the application
        switch (state){
        case Play_scenario_state.START_SCREEN:
        case Play_scenario_state.MAIN_MENU:
        case Play_scenario_state.PREFERENCES:
        case Play_scenario_state.MODALITY_MENU:
            //All buttons are not visibles
            button_modality.SetActive(false);
            button_discipline.SetActive(false);
            button_skill.SetActive(false);
            break;
        case Play_scenario_state.DISCIPLINE_MENU:
            button_modality.SetActive(true);
            button_discipline.SetActive(false);
            button_skill.SetActive(false);
            //Text on buttons
            modality = _database.getModality(GlobalVariables.selected_modality_id);
            button_modality.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=modality.name;

            break;
        case Play_scenario_state.SKILL_MENU:
            button_modality.SetActive(true);
            button_discipline.SetActive(true);
            button_skill.SetActive(false);
            //Text on buttons
            modality = _database.getModality(GlobalVariables.selected_modality_id);
            button_modality.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=modality.name;
            discipline = _database.getDiscipline(GlobalVariables.selected_discipline_id);
            button_discipline.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=discipline.name;

            break;
        case Play_scenario_state.HEROE_MENU:
            button_modality.SetActive(true);
            button_discipline.SetActive(true);
            button_skill.SetActive(true);
            //Text on buttons
            modality = _database.getModality(GlobalVariables.selected_modality_id);
            button_modality.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=modality.name;
            discipline = _database.getDiscipline(GlobalVariables.selected_discipline_id);
            button_discipline.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=discipline.name;
            skill = _database.getSkill(GlobalVariables.selected_skill_id);
            button_skill.GetComponent<Button>().GetComponentsInChildren<Text>()[0].text=skill.name;

            break;
        }
    }
コード例 #8
0
 void Start()
 {
     state = play_and_learn_scenario._play_scenario_state;
     _database = new Database_module ();
 }
コード例 #9
0
    public void Initialize_Modules(Capture_module capture, Compare_module compare, Animation_module animate, Interaction_module interact, GUI_module_play_and_learn user_interface, Recorded_animation_module animate_trial)
    {
        _play_scenario_state = Play_scenario_state.START_SCREEN;

        _capture = capture;
        _compare = compare;
        _animate = animate;
        _interact = interact;
        _user_interface = user_interface;
        _animate_trial = animate_trial;
        //Initialise 3D environment

        //Initialise 3D animation

        //Initialise capture module
        _capture.Initialise_capture(_device);
        //Initialise comparison module
        _compare.Initialise_comparison();
        _compare.DrawPlots = false;
        //Initialise database module

        //Initialise GUI module
        //TEMP
        _play_scenario_state = Play_scenario_state.MAIN_MENU;
        Animation_data temp = new Animation_data();
        temp.Initialize_from_file("test_recorded_data/HB_Underarm_reference");
        _animate_trial.SetRecordedAnimation(temp);

        Animation_data temp_2 = new Animation_data();
        temp_2.Initialize_from_file("test_recorded_data/HB_Underarm_reference_copy");
        _animate_trial.SetReferenceAnimation(temp_2);

        /*_user_interface.SetLoginMenuVisibility (true);*/
        _user_interface.SetChildMainMenuVisibility(true);
        _user_interface.SetChildLeftPanelVisibility(true);
    }
コード例 #10
0
    public void GoToSkills()
    {
        hidePanels();

        _user_interface.SetChildLeftPanelVisibility(true);
        _user_interface.SetSkillPanelVisibility(true);
        _play_scenario_state = Play_scenario_state.SKILL_MENU;
    }