From 93aa94921e027e05d7cb9908305af225c64b1ff2 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Wed, 8 Jan 2025 09:03:30 +0100 Subject: Make format --- game/menus/mainmenu/ITransitionScript.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'game/menus/mainmenu/ITransitionScript.cpp') diff --git a/game/menus/mainmenu/ITransitionScript.cpp b/game/menus/mainmenu/ITransitionScript.cpp index 9e547e6..cd929a0 100644 --- a/game/menus/mainmenu/ITransitionScript.cpp +++ b/game/menus/mainmenu/ITransitionScript.cpp @@ -3,30 +3,27 @@ #include "../MenusConfig.h" -#include -#include #include +#include +#include using namespace crepe; using namespace std; -void ITransitionScript::frame_update(crepe::duration_t delta_time){ - if(this->transition) - { +void ITransitionScript::frame_update(crepe::duration_t delta_time) { + if (this->transition) { // cout << "transition:" << velocity << std::endl; Transform & cam = this->get_components_by_name(CAMERA_NAME).front(); RefVector info_tf = this->get_components_by_tag(MENU_INFO_TAG); for (Transform & tf : info_tf) { tf.position.y -= VELOCITY_INFO_UP * delta_time.count(); } - if(velocity < VELOCITY_MAX && cam.position.x < SLOW_DOWN) velocity += VELOCITY_STEP * delta_time.count(); - else if(velocity > 20) velocity -= VELOCITY_STEP * delta_time.count(); - if(cam.position.x < END) cam.position.x += (velocity * delta_time.count()); - if(cam.position.x >= END) - { + if (velocity < VELOCITY_MAX && cam.position.x < SLOW_DOWN) + velocity += VELOCITY_STEP * delta_time.count(); + else if (velocity > 20) velocity -= VELOCITY_STEP * delta_time.count(); + if (cam.position.x < END) cam.position.x += (velocity * delta_time.count()); + if (cam.position.x >= END) { this->set_next_scene(this->get_scene_name()); } - } } - -- cgit v1.2.3