void Update() { if (master.game_state != GameState.Cutscene) { return; } // start event. if (!is_current_event_item_started) { StartEventItem(); } current_event_time += Time.deltaTime; current_event_step_time += Time.deltaTime; current_event_step_time_interval = (master.input_controller.Is_Input_Interact) ? EVENT_STEP_INTERVAL_FAST : EVENT_STEP_INTERVAL_DEFAULT; if (current_event_step_time >= current_event_step_time_interval) { current_event_step_time = 0.0f; // continue event. ProcessEventItem(); } // finish event if possible. FinishEventItem(); if (is_current_event_item_finished) { is_current_event_item_started = false; is_current_event_item_finished = false; // move onto next event, or finish // when meeting right criteria. if (current_event.GetNextEventSource() == null) { // return to game if there are no more items. EndCutscene(); } else { // start the next cutscene event. StartCutscene(current_event.GetNextEventSource()); } } }