aboutsummaryrefslogtreecommitdiff
path: root/game/mainmenu/SetShopScript.cpp
blob: 427445baf690e2326ae9a0888927b7d42ca4edc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "SetShopScript.h"
#include "MainMenuConfig.h"
#include "iostream"

using namespace crepe;
using namespace std;

void SetShopScript::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){
	this->set_next_scene(MainMenuConfig::SHOP_SCENE);
	cout << "Start triggered:" << e.metadata.game_object_id << std::endl;
	return false;
}