private void check_current_level() { levelParametersGame new_level = level_director.check_current_level(score); if (new_level.get_level() > current_level.get_level()) { change_level(new_level); } }
public void change_level(levelParametersGame new_level) { audio_director.Play("level_up"); Time.timeScale = 0f; current_level = new_level; level_num = current_level.get_level(); enemy_director.set_level(level_num); ui_director.set_level(level_num); ui_director.show_level_up(current_level.name, current_level.message); Debug.Log("new level researched"); }
public levelParametersGame check_current_level(int score) { levelParametersGame current_level = levels[0]; foreach (levelParametersGame level in levels) { if (score >= level.score_for_this_level) { current_level = level; } } return(current_level); }
void Start() { current_level = level_director.check_current_level(0); set_score(start_score); set_lives(start_lives); }