// needs start position, target spacing, num cycles, num targets per cycle public void Configure(Even_Breathing_Data even_breathing_data) { this.even_breathing_data = even_breathing_data; }
public void Start_Level() { Debug.Log("Script_Level: Start_Level(): level_number: " + level_number); if (level_number == 0) { Debug.Log("Sending message to GUI_controller to hide GUI_health_bar"); GUI_controller.SendMessage("Hide", GameObject.FindGameObjectWithTag("GUI_health_bar")); } else { GUI_controller.SendMessage("Show", GameObject.FindGameObjectWithTag("GUI_health_bar")); } if (has_even_breathing) { GameObject controller_even_breathing = GameObject.Find("Even_Breathing_Controller"); even_breathing_data = new Even_Breathing_Data(prefab_breathing_target, transform.position + even_breathing_start_position, even_breathing_target_x_spacing, even_breathing_num_targets_per_cycles, even_breathing_num_cycles); controller_even_breathing.SendMessage("Configure", even_breathing_data); controller_even_breathing.SendMessage("Populate_Targets"); } if (has_click_target) { GameObject click_target_generator = GameObject.Find("Click_Target_Generator"); is_click_target = true; Click_Target_Data click_target_data = new Click_Target_Data(prefab_click_target, num_click_targets_to_generate, click_target_generation_bounds, target_types); click_target_generator_data = new Click_Target_Generator_Data(click_target_data, num_click_targets_to_generate); click_target_generator.SendMessage("Configure", click_target_generator_data); click_target_generator.SendMessage("Wait_And_Spawn"); is_click_target = false; } if (has_moving_target) { GameObject moving_target_generator = GameObject.Find("Moving_Target_Generator"); is_moving_target = true; Click_Target_Data moving_target_data = new Click_Target_Data(prefab_moving_target, num_moving_targets_to_generate, moving_target_generation_bounds, target_types); Click_Target_Generator_Data moving_target_generator_data = new Click_Target_Generator_Data(moving_target_data, num_moving_targets_to_generate); moving_target_generator.SendMessage("Configure", moving_target_generator_data); moving_target_generator.SendMessage("Wait_And_Spawn"); is_moving_target = false; } if (has_dissapearing_target) { GameObject dissapearing_target_generator = GameObject.Find("Dissapearing_Target_Generator"); is_dissapearing_target = true; Click_Target_Data dissapearing_target_data = new Click_Target_Data(prefab_dissapearing_target, num_dissapearing_targets_to_generate, dissapearing_target_generation_bounds, target_types); Click_Target_Generator_Data dissapearing_target_generator_data = new Click_Target_Generator_Data(dissapearing_target_data, num_dissapearing_targets_to_generate); dissapearing_target_generator.SendMessage("Configure", dissapearing_target_generator_data); dissapearing_target_generator.SendMessage("Wait_And_Spawn"); is_dissapearing_target = false; } if (has_attacking_target) { GameObject attacking_target_generator = GameObject.Find("Attacking_Target_Generator"); is_attacking_target = true; Click_Target_Data attacking_target_data = new Click_Target_Data(prefab_attacking_target, num_attacking_targets_to_generate, attacking_target_generation_bounds, target_types); Click_Target_Generator_Data attacking_target_generator_data = new Click_Target_Generator_Data(attacking_target_data, num_attacking_targets_to_generate); attacking_target_generator.SendMessage("Configure", attacking_target_generator_data); attacking_target_generator.SendMessage("Wait_And_Spawn"); is_attacking_target = true; } GameObject.Find("Statistics_Controller").SendMessage("On_Level_Started", level_number); GameObject.FindGameObjectWithTag("player").SendMessage("Start_Moving"); GameObject.FindGameObjectWithTag("player").SendMessage("On_Level_Started", level_number); }
void Start() { even_breathing_data = null; }