aboutsummaryrefslogtreecommitdiff
path: root/game/mainmenu
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-28 19:33:06 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-28 19:33:06 +0100
commitfb096afbdf3d24f5b9f31626ddf8581033346f88 (patch)
tree1cb4e653322784fc28d87e0458c63d1e3d199f20 /game/mainmenu
parent26d66b7a73ac8d172d342be03bd75bd5bea221e1 (diff)
coins with system pooling
Diffstat (limited to 'game/mainmenu')
-rw-r--r--game/mainmenu/ITransitionScript.cpp2
-rw-r--r--game/mainmenu/MainMenuScene.cpp6
2 files changed, 1 insertions, 7 deletions
diff --git a/game/mainmenu/ITransitionScript.cpp b/game/mainmenu/ITransitionScript.cpp
index a7f5a0d..433f9f7 100644
--- a/game/mainmenu/ITransitionScript.cpp
+++ b/game/mainmenu/ITransitionScript.cpp
@@ -11,7 +11,7 @@ using namespace std;
void ITransitionScript::frame_update(crepe::duration_t delta_time){
if(this->transition)
{
- cout << "transition:" << velocity << std::endl;
+ // cout << "transition:" << velocity << std::endl;
Transform & cam = this->get_components_by_name<Transform>(MainMenuConfig::CAMERA_NAME).front();
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();
diff --git a/game/mainmenu/MainMenuScene.cpp b/game/mainmenu/MainMenuScene.cpp
index 472f190..80c945b 100644
--- a/game/mainmenu/MainMenuScene.cpp
+++ b/game/mainmenu/MainMenuScene.cpp
@@ -5,10 +5,8 @@
#include "api/BehaviorScript.h"
#include "api/Camera.h"
#include "../StartSubScene.h"
-#include "../coins/CoinSubScene.h"
#include "MainMenuConfig.h"
#include "api/GameObject.h"
-#include "api/Rigidbody.h"
#include "api/Sprite.h"
using namespace crepe;
@@ -49,10 +47,6 @@ void MainMenuScene::load_scene(){
.position = pos,
.script = ButtonSubScene::ScriptSelect::SHOP,
});
-
- CoinSubScene coin;
- coin.create(*this);
- coin.create(*this);
//Start of map
StartSubScene start;