public void OK_button() { if (target_text.text != "") { int old_profile = my_game_master.current_profile_selected; my_game_master.current_profile_selected = profile_slot; if (my_manage_menu_uGUI.current_screen == my_manage_menu_uGUI.profile_screen) //update profile screen { my_profile_manager.Select_this_profile(old_profile); my_profile_manager.Select_this_profile(profile_slot); } my_game_master.Gui_sfx(my_game_master.tap_sfx); my_game_master.Create_new_profile(my_name); my_name = ""; target_text.text = my_name; my_manage_menu_uGUI.Update_profile_name(true); Return_to_previous_screen(); my_profile_manager.Update_this_slot(my_game_master.current_profile_selected); } else { my_game_master.Gui_sfx(my_game_master.tap_error_sfx); } }
public void Ok_button() { if (my_input.text != "") { int old_profile = my_game_master.current_profile_selected; my_game_master.current_profile_selected = profile_slot; if (my_manage_menu_uGUI.current_screen == my_manage_menu_uGUI.profile_screen) //update profile screen { my_profile_manager.Select_this_profile(old_profile); my_profile_manager.Select_this_profile(profile_slot); } my_game_master.Gui_sfx(my_game_master.tap_sfx); my_game_master.Create_new_profile(my_input.text); my_input.text = ""; my_manage_menu_uGUI.Update_profile_name(true); this.gameObject.SetActive(false); my_profile_manager.Update_this_slot(my_game_master.current_profile_selected); } else { my_game_master.Gui_sfx(my_game_master.tap_error_sfx); } }
public void Create_new_profile(int profile_slot, bool show_cancel_button) { //copy options settings game_master.music_on[profile_slot] = game_master.music_on[my_game_master.current_profile_selected]; game_master.music_volume[profile_slot] = game_master.music_volume[my_game_master.current_profile_selected]; game_master.sfx_on[profile_slot] = game_master.sfx_on[my_game_master.current_profile_selected]; game_master.sfx_volume[profile_slot] = game_master.sfx_volume[my_game_master.current_profile_selected]; game_master.voice_on[profile_slot] = game_master.voice_on[my_game_master.current_profile_selected]; game_master.voice_volume[profile_slot] = game_master.voice_volume[my_game_master.current_profile_selected]; my_game_master.Save(profile_slot); //my_game_master.current_profile_selected = profile_slot; Show_current_slot_selected(); if (my_game_master.require_a_name_for_profiles) { if (my_game_master.use_pad) { my_manage_menu_uGUI.current_screen.gameObject.SetActive(false); my_manage_menu_uGUI.my_new_profile_pad.My_start(profile_slot, show_cancel_button, profiles_array[profile_slot].gameObject); my_manage_menu_uGUI.Mark_this_button(my_manage_menu_uGUI.new_profile_window_pad_target_button); } else { my_manage_menu_uGUI.my_new_profile_window.GetComponent <new_profile_window>().My_start(profile_slot, show_cancel_button); //my_manage_menu_uGUI.my_new_profile_window.SetActive(true); //my_manage_menu_uGUI.my_new_profile_window.GetComponent<new_profile_window>().Focus(); } } else { my_game_master.Create_new_profile(""); Update_this_slot(profile_slot); } }
void Show_home_screen() { bool you_must_refresh_stage_and_world_screen = my_game_master.refresh_stage_and_world_screens; my_game_master.refresh_stage_and_world_screens = false; game_master.game_is_started = true; logo_screen.gameObject.SetActive(false); Mark_current_screen(home_screen); Mark_this_button(home_screen_target_button); //profiles if (my_game_master.number_of_save_profile_slot_avaibles > 1) { if (my_game_master.show_new_profile_window) { if (my_game_master.require_a_name_for_profiles) { if (my_game_master.use_pad) { my_new_profile_pad.My_start(0, false, home_screen_target_button); home_screen.gameObject.SetActive(false); Mark_this_button(new_profile_window_pad_target_button); } else { my_new_profile_window.GetComponent <new_profile_window>().My_start(0, false); //my_new_profile_window.SetActive(true); } } else { my_game_master.Create_new_profile(""); you_must_refresh_stage_and_world_screen = true; } } //else //{ //my_new_profile_window.SetActive(false); //} //Update_profile_name(false); profile_button.SetActive(true); } else { profile_button.SetActive(false); you_must_refresh_stage_and_world_screen = true; } //store if (my_game_master.store_enabled) { store_ico.SetActive(true); } else { store_ico.SetActive(false); } Update_profile_name(you_must_refresh_stage_and_world_screen); }