From cd69fcce59532b1fd21ce1ac566d13ad34bd526b Mon Sep 17 00:00:00 2001 From: Max-001 Date: Sat, 11 Jan 2025 10:35:38 +0100 Subject: Fixed bug Wouter --- game/StartGameScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'game') diff --git a/game/StartGameScript.cpp b/game/StartGameScript.cpp index 48055af..6d47e65 100644 --- a/game/StartGameScript.cpp +++ b/game/StartGameScript.cpp @@ -64,7 +64,7 @@ void StartGameScript::fixed_update(crepe::duration_t dt) { // Start camera movement, enable player jumping and disable this script if (player_transform.position.x > 500) { Rigidbody & rb = this->get_components_by_name("camera").front(); - rb.data.linear_velocity = vec2(PLAYER_SPEED * dt.count(), 0); + rb.data.linear_velocity = vec2(PLAYER_SPEED * 0.02, 0); BehaviorScript & player_script = this->get_components_by_name("player").front(); player_script.active = true; -- cgit v1.2.3 From 1e89a817a41c67e34d75d13cc8017de9c5bdac30 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Sat, 11 Jan 2025 10:42:11 +0100 Subject: Fixed bug: Sprites less pixely --- game/menus/shop/ShopMenuScene.cpp | 113 +++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) (limited to 'game') diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp index 641352c..84d6035 100644 --- a/game/menus/shop/ShopMenuScene.cpp +++ b/game/menus/shop/ShopMenuScene.cpp @@ -67,10 +67,47 @@ void ShopMenuScene::load_scene() { Asset("asset/other_effects/effect_rocketmgshell_TVOS.png"), Sprite::Data { .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, - .size = {0, 100}, + .size = {0, 20}, + .angle_offset = 30, .position_offset = {0, 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, 20}, + .angle_offset = 10, + .position_offset = {-10, -30}, + } + ); + 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, 20}, + .angle_offset = -10, + .position_offset = {-40, 30}, + } + ); + 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, 20}, + .angle_offset = 0, + .position_offset = {10, 15}, + } + ); + 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, 20}, + .angle_offset = -5, + .position_offset = {45, -5}, + } + ); const string BULLETS_STRING = "BULLETS"; size @@ -112,10 +149,82 @@ void ShopMenuScene::load_scene() { Asset("asset/background/aquarium/bubble.png"), Sprite::Data { .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, - .size = {0, 100}, + .size = {0, 10}, .position_offset = {0, 0}, } ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 10}, + .position_offset = {-50, -20}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 20}, + .position_offset = {45, -40}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 20}, + .position_offset = {-20, 40}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 15}, + .position_offset = {15, -25}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 10}, + .position_offset = {10, 5}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 10}, + .position_offset = {-5, -20}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 20}, + .position_offset = {15, -40}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 20}, + .position_offset = {-20, 10}, + } + ); + shop_item_bubble.add_component( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 15}, + .position_offset = {30, -25}, + } + ); const string BUBBLE_STRING = "BUBBLE"; size -- cgit v1.2.3 From a57aa66f95c85e427b7ae51cadad4e4388d1a802 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Sat, 11 Jan 2025 10:54:39 +0100 Subject: Bug fix: Back button not vissible --- game/menus/shop/ShopMenuScene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp index 84d6035..4975a95 100644 --- a/game/menus/shop/ShopMenuScene.cpp +++ b/game/menus/shop/ShopMenuScene.cpp @@ -54,7 +54,8 @@ void ShopMenuScene::load_scene() { .position = {-400, -350}, .script_type = ButtonSubScene::ScriptSelect::MAINMENU, .button_type = ButtonSubScene::ButtonSelect::BACK, - .scale = 0.8 + .scale = 0.8, + .sorting_layer_offset = 1, } ); -- cgit v1.2.3