public void restart(short stage_index) { this.current_stage = stage_index; reset(); CUIManager.Instance.get_uipage(UI_PAGE.PLAY_ROOM).GetComponent <CPlayRoom>().refresh_hp_bar(this.hp); this.current_game_mode = GAME_MODE.VISIBLITY; this.current_stage_attribute = CTableStageAttribute.find_stage_attr(this.selected_area, this.current_stage); refresh_stage_data(); CUIManager.Instance.get_uipage(UI_PAGE.PLAY_ROOM).GetComponent <CPlayRoom>().restart(); this.enemy_generator.restart(CGameLogic.Instance.current_stage_attribute); CSoundManager.Instance.volume_up(); }
public void restart(CTableStageAttribute stage_attribute) { this.current_play_state = PLAY_STATE.PLAYING; destroy_all(); this.current_stage_attribute = stage_attribute; this.prev_generated_time = Time.time; StopAllCoroutines(); StartCoroutine("run"); this.success_targets.Clear(); this.death_list.Clear(); StartCoroutine(update_success_scene()); }
public void move_to_next_stage() { int count = CTableStageAttribute.find_stage_attr(this.selected_area).Count; if (this.current_stage < count - 1) { ++this.current_stage; restart(this.current_stage); } else { CUIManager.Instance.get_uipage(UI_PAGE.GAME_RESULT).GetComponent <CGameResult>().on_back(); } }
public void refresh(short stage_list_index) { CSoundManager.Instance.volume_up(); this.current_stage_index = stage_list_index; this.stage_attrs = CTableStageAttribute.find_stage_attr(CGameLogic.Instance.selected_area); this.stage_title.text = this.stage_attrs[stage_list_index].title; this.stage_text.text = this.stage_attrs[stage_list_index].text; hide_all_goldstars(); short stage_index = get_current_stage_attr().stage_index; byte star_count = CUserManager.Instance.owner.get_star_count_of_stage(stage_index); for (byte i = 0; i < star_count; ++i) { this.star_gold[i].SetActive(true); } show_preview(); }