aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/CMakeLists.txt16
-rw-r--r--game/coins/coinSubScene.cpp0
-rw-r--r--game/coins/coinSubScene.h0
-rw-r--r--game/mainmenu/ButtonSetShopScript.cpp (renamed from game/mainmenu/SetShopScript.cpp)6
-rw-r--r--game/mainmenu/ButtonSetShopScript.h (renamed from game/mainmenu/SetShopScript.h)2
-rw-r--r--game/mainmenu/ButtonSubScene.cpp8
-rw-r--r--game/mainmenu/ButtonTransitionPreviewScript.cpp (renamed from game/mainmenu/ShowPreviewScript.cpp)8
-rw-r--r--game/mainmenu/ButtonTransitionPreviewScript.h (renamed from game/mainmenu/ShowPreviewScript.h)4
-rw-r--r--game/mainmenu/ITransitionScript.cpp (renamed from game/mainmenu/IShowScript.cpp)4
-rw-r--r--game/mainmenu/ITransitionScript.h (renamed from game/mainmenu/IShowScript.h)2
-rw-r--r--game/mainmenu/MainMenuScene.cpp4
-rw-r--r--game/mainmenu/TransitionStartScript.cpp (renamed from game/mainmenu/ShowStartScript.cpp)8
-rw-r--r--game/mainmenu/TransitionStartScript.h (renamed from game/mainmenu/ShowStartScript.h)4
13 files changed, 33 insertions, 33 deletions
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 2fc5e41..60ac8e6 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -25,12 +25,12 @@ set(SOURCES
mainmenu/IButtonScript.cpp
mainmenu/ButtonSubScene.cpp
mainmenu/MainMenuScene.cpp
- mainmenu/IShowScript.cpp
- mainmenu/ShowStartScript.cpp
- mainmenu/ShowPreviewScript.cpp
+ mainmenu/ITransitionScript.cpp
+ mainmenu/TransitionStartScript.cpp
+ mainmenu/ButtonTransitionPreviewScript.cpp
mainmenu/ShopMenuScene.cpp
mainmenu/BannerSubScene.cpp
- mainmenu/SetShopScript.cpp
+ mainmenu/ButtonSetShopScript.cpp
)
set(HEADERS
@@ -49,12 +49,12 @@ set(HEADERS
mainmenu/ButtonSubScene.h
mainmenu/MainMenuScene.h
mainmenu/MainMenuConfig.h
- mainmenu/IShowScript.h
- mainmenu/ShowStartScript.h
- mainmenu/ShowPreviewScript.h
+ mainmenu/ITransitionScript.h
+ mainmenu/TransitionStartScript.h
+ mainmenu/ButtonTransitionPreviewScript.h
mainmenu/ShopMenuScene.h
mainmenu/BannerSubScene.h
- mainmenu/SetShopScript.h
+ mainmenu/ButtonSetShopScript.h
)
add_executable(main ${SOURCES} ${HEADERS})
diff --git a/game/coins/coinSubScene.cpp b/game/coins/coinSubScene.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/game/coins/coinSubScene.cpp
diff --git a/game/coins/coinSubScene.h b/game/coins/coinSubScene.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/game/coins/coinSubScene.h
diff --git a/game/mainmenu/SetShopScript.cpp b/game/mainmenu/ButtonSetShopScript.cpp
index 427445b..0c855ec 100644
--- a/game/mainmenu/SetShopScript.cpp
+++ b/game/mainmenu/ButtonSetShopScript.cpp
@@ -1,17 +1,17 @@
-#include "SetShopScript.h"
+#include "ButtonSetShopScript.h"
#include "MainMenuConfig.h"
#include "iostream"
using namespace crepe;
using namespace std;
-void SetShopScript::init(){
+void ButtonSetShopScript::init(){
cout << "script init" << endl;
IButtonScript::init();
this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); });
}
-bool SetShopScript::on_button_press(const ButtonPressEvent& e){
+bool ButtonSetShopScript::on_button_press(const ButtonPressEvent& e){
this->set_next_scene(MainMenuConfig::SHOP_SCENE);
cout << "Start triggered:" << e.metadata.game_object_id << std::endl;
return false;
diff --git a/game/mainmenu/SetShopScript.h b/game/mainmenu/ButtonSetShopScript.h
index 0705e57..51db928 100644
--- a/game/mainmenu/SetShopScript.h
+++ b/game/mainmenu/ButtonSetShopScript.h
@@ -3,7 +3,7 @@
#include "IButtonScript.h"
#include <crepe/api/Script.h>
-class SetShopScript : public IButtonScript {
+class ButtonSetShopScript : public IButtonScript {
public:
void init() override;
bool on_button_press(const crepe::ButtonPressEvent& e);
diff --git a/game/mainmenu/ButtonSubScene.cpp b/game/mainmenu/ButtonSubScene.cpp
index d110aaa..b4abe21 100644
--- a/game/mainmenu/ButtonSubScene.cpp
+++ b/game/mainmenu/ButtonSubScene.cpp
@@ -1,6 +1,6 @@
#include "ButtonSubScene.h"
-#include "SetShopScript.h"
-#include "ShowPreviewScript.h"
+#include "ButtonSetShopScript.h"
+#include "ButtonTransitionPreviewScript.h"
#include "MainMenuConfig.h"
#include <crepe/api/BehaviorScript.h>
@@ -51,10 +51,10 @@ void ButtonSubScene::btn_text_middle(crepe::GameObject & button_object,const std
void ButtonSubScene::set_script(crepe::GameObject & button_object,ScriptSelect script){
switch (script) {
case ScriptSelect::PREVIEW:
- button_object.add_component<BehaviorScript>().set_script<ShowPreviewScript>();
+ button_object.add_component<BehaviorScript>().set_script<ButtonTransitionPreviewScript>();
break;
case ScriptSelect::SHOP:
- button_object.add_component<BehaviorScript>().set_script<SetShopScript>();
+ button_object.add_component<BehaviorScript>().set_script<ButtonSetShopScript>();
case ScriptSelect::NONE:
break;
}
diff --git a/game/mainmenu/ShowPreviewScript.cpp b/game/mainmenu/ButtonTransitionPreviewScript.cpp
index 978a9c6..d73c0f3 100644
--- a/game/mainmenu/ShowPreviewScript.cpp
+++ b/game/mainmenu/ButtonTransitionPreviewScript.cpp
@@ -1,4 +1,4 @@
-#include "ShowPreviewScript.h"
+#include "ButtonTransitionPreviewScript.h"
#include "MainMenuConfig.h"
#include "iostream"
@@ -6,19 +6,19 @@ using namespace crepe;
using namespace std;
-void ShowPreviewScript::init(){
+void ButtonTransitionPreviewScript::init(){
cout << "script init" << endl;
IButtonScript::init();
this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); });
}
-bool ShowPreviewScript::on_button_press(const ButtonPressEvent& e){
+bool ButtonTransitionPreviewScript::on_button_press(const ButtonPressEvent& e){
if(!this->transition) this->transition = true;
cout << "Start triggered:" << e.metadata.game_object_id << std::endl;
return false;
}
-const char* ShowPreviewScript::get_scene_name() const {
+const char* ButtonTransitionPreviewScript::get_scene_name() const {
// Provide the next scene defined in MainMenuConfig
return MainMenuConfig::PREVIEW_SCENE;
}
diff --git a/game/mainmenu/ShowPreviewScript.h b/game/mainmenu/ButtonTransitionPreviewScript.h
index 28fe95b..4e5e6c9 100644
--- a/game/mainmenu/ShowPreviewScript.h
+++ b/game/mainmenu/ButtonTransitionPreviewScript.h
@@ -1,9 +1,9 @@
#pragma once
#include "IButtonScript.h"
-#include "IShowScript.h"
+#include "ITransitionScript.h"
-class ShowPreviewScript : public IShowScript, public IButtonScript {
+class ButtonTransitionPreviewScript : public ITransitionScript, public IButtonScript {
public:
void init() override;
bool on_button_press(const crepe::ButtonPressEvent& e);
diff --git a/game/mainmenu/IShowScript.cpp b/game/mainmenu/ITransitionScript.cpp
index adb6e89..a7f5a0d 100644
--- a/game/mainmenu/IShowScript.cpp
+++ b/game/mainmenu/ITransitionScript.cpp
@@ -1,4 +1,4 @@
-#include "IShowScript.h"
+#include "ITransitionScript.h"
#include "api/Rigidbody.h"
#include "api/Transform.h"
#include "iostream"
@@ -8,7 +8,7 @@
using namespace crepe;
using namespace std;
-void IShowScript::frame_update(crepe::duration_t delta_time){
+void ITransitionScript::frame_update(crepe::duration_t delta_time){
if(this->transition)
{
cout << "transition:" << velocity << std::endl;
diff --git a/game/mainmenu/IShowScript.h b/game/mainmenu/ITransitionScript.h
index e1e645a..78f1016 100644
--- a/game/mainmenu/IShowScript.h
+++ b/game/mainmenu/ITransitionScript.h
@@ -2,7 +2,7 @@
#include <crepe/api/Script.h>
-class IShowScript : public virtual crepe::Script {
+class ITransitionScript : public virtual crepe::Script {
public:
void frame_update(crepe::duration_t delta_time) override;
virtual const char* get_scene_name() const = 0;
diff --git a/game/mainmenu/MainMenuScene.cpp b/game/mainmenu/MainMenuScene.cpp
index 42d0eca..8ffea70 100644
--- a/game/mainmenu/MainMenuScene.cpp
+++ b/game/mainmenu/MainMenuScene.cpp
@@ -1,7 +1,7 @@
#include "MainMenuScene.h"
#include "ButtonSubScene.h"
-#include "ShowStartScript.h"
+#include "TransitionStartScript.h"
#include "api/BehaviorScript.h"
#include "api/Camera.h"
#include "../StartSubScene.h"
@@ -27,7 +27,7 @@ void MainMenuScene::load_scene(){
.sorting_in_layer = MainMenuConfig::STARTING_SORTING_IN_LAYER+0,
.size = {300,860},
});
- menu.add_component<BehaviorScript>().set_script<ShowStartScript>();
+ menu.add_component<BehaviorScript>().set_script<TransitionStartScript>();
ButtonSubScene button;
vec2 pos = MainMenuConfig::MENU_OFFSET;
diff --git a/game/mainmenu/ShowStartScript.cpp b/game/mainmenu/TransitionStartScript.cpp
index 7179038..5528bf9 100644
--- a/game/mainmenu/ShowStartScript.cpp
+++ b/game/mainmenu/TransitionStartScript.cpp
@@ -1,4 +1,4 @@
-#include "ShowStartScript.h"
+#include "TransitionStartScript.h"
#include "MainMenuConfig.h"
#include "api/Event.h"
#include "iostream"
@@ -7,15 +7,15 @@ using namespace crepe;
using namespace std;
-void ShowStartScript::init(){
+void TransitionStartScript::init(){
cout << "script init" << endl;
}
-void ShowStartScript::fixed_update(crepe::duration_t dt){
+void TransitionStartScript::fixed_update(crepe::duration_t dt){
if(this->get_key_state(Keycode::ENTER) && this->transition == false) this->transition = true;
}
-const char* ShowStartScript::get_scene_name() const {
+const char* TransitionStartScript::get_scene_name() const {
// Provide the next scene defined in MainMenuConfig
return MainMenuConfig::START_SCENE;
}
diff --git a/game/mainmenu/ShowStartScript.h b/game/mainmenu/TransitionStartScript.h
index 27d9404..76f532e 100644
--- a/game/mainmenu/ShowStartScript.h
+++ b/game/mainmenu/TransitionStartScript.h
@@ -1,8 +1,8 @@
#pragma once
-#include "IShowScript.h"
+#include "ITransitionScript.h"
-class ShowStartScript : public IShowScript {
+class TransitionStartScript : public ITransitionScript {
public:
void init() override;
void fixed_update(crepe::duration_t dt) override;