aboutsummaryrefslogtreecommitdiff
path: root/game/mainmenu/ShopMenuScene.cpp
blob: b18ae47ce2d755cf95b168c6f6c78449ad1588cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "ShopMenuScene.h"
#include "api/Camera.h"
#include "MainMenuConfig.h"
#include "api/Sprite.h"
#include "BannerSubScene.h"

using namespace crepe;
using namespace std;

void ShopMenuScene::load_scene(){
	GameObject camera_object = this->new_object(MainMenuConfig::CAMERA_NAME);
	camera_object.add_component<Camera>(ivec2(990, 720), vec2(1100, 800),
	Camera::Data{
		.bg_color = Color::RED,
	});
	BannerSubScene banner;
	banner.create(*this);
	GameObject menu_background = this->new_object("menu_background");
	menu_background.add_component<Sprite>(
		Asset("asset/ui/background.png"),
		Sprite::Data{
		.sorting_in_layer = MainMenuConfig::STARTING_SORTING_IN_LAYER+0,
		.size = {1100,860},
		.position_offset {0},
		});
}

string ShopMenuScene::get_name() const { return "shopmenu"; }