diff options
Diffstat (limited to 'game/mainmenu/ITransitionScript.cpp')
-rw-r--r-- | game/mainmenu/ITransitionScript.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/game/mainmenu/ITransitionScript.cpp b/game/mainmenu/ITransitionScript.cpp deleted file mode 100644 index e923073..0000000 --- a/game/mainmenu/ITransitionScript.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "ITransitionScript.h" -#include "api/Rigidbody.h" -#include "api/Transform.h" -#include "iostream" -#include <crepe/api/Camera.h> -#include "MainMenuConfig.h" -#include "types.h" - -using namespace crepe; -using namespace std; - -void ITransitionScript::frame_update(crepe::duration_t delta_time){ - if(this->transition) - { - // cout << "transition:" << velocity << std::endl; - Transform & cam = this->get_components_by_name<Transform>(MainMenuConfig::CAMERA_NAME).front(); - RefVector<Transform> info_tf = this->get_components_by_tag<Transform>(MainMenuConfig::MENU_INFO_TAG); - for (Transform & tf : info_tf) { - tf.position.y -= MainMenuConfig::VELOCITY_INFO_UP * delta_time.count(); - } - if(velocity < MainMenuConfig::VELOCITY_MAX && cam.position.x < MainMenuConfig::SLOW_DOWN) velocity += MainMenuConfig::VELOCITY_STEP * delta_time.count(); - else if(velocity > 20) velocity -= MainMenuConfig::VELOCITY_STEP * delta_time.count(); - if(cam.position.x < MainMenuConfig::END) cam.position.x += (velocity * delta_time.count()); - if(cam.position.x >= MainMenuConfig::END) - { - this->set_next_scene(this->get_scene_name()); - } - - } -} - |