From c12366610c4d8732362d602864e805575b31a9d2 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Wed, 8 Jan 2025 15:10:48 +0100 Subject: Made shop --- game/menus/shop/ShopMenuScene.cpp | 71 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'game/menus/shop') diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp index 21e3f02..ee0fb6b 100644 --- a/game/menus/shop/ShopMenuScene.cpp +++ b/game/menus/shop/ShopMenuScene.cpp @@ -1,12 +1,15 @@ #include "ShopMenuScene.h" +#include "../../Config.h" #include "../BannerSubScene.h" #include "../ButtonSubScene.h" #include "../MenusConfig.h" +#include "types.h" #include #include +#include using namespace crepe; using namespace std; @@ -50,6 +53,74 @@ void ShopMenuScene::load_scene() { .scale = 0.8 } ); + + GameObject shop_item_bullet = this->new_object("bullet", "shop_item", vec2(-100, 0)); + shop_item_bullet.add_component( + Asset("asset/other_effects/effect_rocketmgshell_TVOS.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 100}, + .position_offset = {0, 0}, + } + ); + shop_item_bullet.add_component( + vec2 {100, 50}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::WHITE, + }, + vec2 {0, -75}, "BULLETS" + ); + shop_item_bullet.add_component( + Asset("asset/ui/buttonCoinsSmall.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 45}, + .position_offset = {25, 75}, + } + ); + shop_item_bullet.add_component( + vec2 {37.5, 37.5}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::YELLOW, + }, + vec2 {-25, 75}, "0" + ); + + GameObject shop_item_bubble = this->new_object("bubble", "shop_item", vec2(100, 0)); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 100}, + .position_offset = {0, 0}, + } + ); + shop_item_bubble.add_component( + vec2 {100, 50}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::WHITE, + }, + vec2 {0, -75}, "BUBBLE" + ); + shop_item_bubble.add_component( + Asset("asset/ui/buttonCoinsSmall.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 45}, + .position_offset = {45, 75}, + } + ); + shop_item_bubble.add_component( + vec2 {100, 25}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::YELLOW, + }, + vec2 {-25, 75}, "1000" + ); } string ShopMenuScene::get_name() const { return SHOP_SCENE; } -- cgit v1.2.3