Skip to content

Commit

Permalink
Merge branch 'dev' into patch-atomic-fixing-the-game-before-deploymen…
Browse files Browse the repository at this point in the history
…t-02-22-2025-1740268642
  • Loading branch information
h0lybyte authored Feb 23, 2025
2 parents d751aec + 116a179 commit 38b8392
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
19 changes: 19 additions & 0 deletions apps/gamejam/brackeys/13/scenes/planet.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=3 uid="uid://c772pj7ujqm8m"]

[ext_resource type="Script" path="res://scripts/planet.gd" id="1_x2mqs"]
[ext_resource type="Texture2D" uid="uid://dcrqllgsdaexs" path="res://assets/audioknobs-ui/audioknobs/green-light-off.png" id="2_f0omh"]

[sub_resource type="CircleShape2D" id="CircleShape2D_lpow5"]
radius = 6.0

[node name="Planet" type="Area2D"]
script = ExtResource("1_x2mqs")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_f0omh")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_lpow5")

[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
2 changes: 2 additions & 0 deletions apps/gamejam/brackeys/13/scenes/shop/shop.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ expand_margin_right = 20.0
expand_margin_bottom = 10.0

[node name="Shop" type="ColorRect"]
process_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
Expand Down Expand Up @@ -405,6 +406,7 @@ script = ExtResource("14_mhgll")
lights_on = ExtResource("17_2kql4")
lights_off = ExtResource("13_swidh")

[connection signal="pressed" from="HBoxContainer/Label3/Button" to="." method="_on_button_pressed_exit"]
[connection signal="pressed" from="MainBG/LeftPanel/HBoxContainer/LeftButton" to="." method="_on_left_button_pressed_left_panel"]
[connection signal="pressed" from="MainBG/LeftPanel/HBoxContainer/EnterButton" to="." method="_on_enter_button_pressed_left_panel"]
[connection signal="pressed" from="MainBG/LeftPanel/HBoxContainer/RightButton" to="." method="_on_right_button_pressed_left_panel"]
Expand Down
21 changes: 21 additions & 0 deletions apps/gamejam/brackeys/13/scripts/planet.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends Area2D

#onready var shop := shop_path in the game scene


func _on_body_entered(body) -> void:
if body is Spaceship:
# Show button that can open the shop
# if clicked:
# get_tree().paused = true - Pause game
# shop.show() - Show shop
# animation_shop_open.play() - Animation opening the shop
pass

# On the shop, when pressing the top right button, it exits/hide the shop/reverse the animation,
# and then unpause the game

func _on_body_exited(body):
if body is Spaceship:
# hide the button
pass # Replace with function body.
6 changes: 6 additions & 0 deletions apps/gamejam/brackeys/13/scripts/shop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,9 @@ func update_bottom_panel_screen() -> void:
for i in Global.base_starship_stats.keys():
full_text += "%s: %d " % [i.capitalize(), Global.base_starship_stats[i] + Global.starship_bonuses[i]]
bottom_panel_screen_label.text = full_text

func _on_button_pressed_exit(): # Hides the shop on exit
self.hide()
get_tree().paused = false
pass

10 changes: 6 additions & 4 deletions apps/gamejam/brackeys/13/theme/Theme.tres
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ bg_color = Color(0.6, 0.6, 0.6, 0)
texture = ExtResource("4_4s0nj")
texture_margin_top = 20.0

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2n2so"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_nfv2t"]
texture = ExtResource("6_oemoe")

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2n2so"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_bnh2f"]
texture = ExtResource("7_s6l0y")

Expand All @@ -46,11 +46,11 @@ axis_stretch_vertical = 1
texture = ExtResource("7_f3kbi")
axis_stretch_vertical = 1

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xiin7"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_0f342"]
texture = ExtResource("9_0vmdh")

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xiin7"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_4rt04"]
texture = ExtResource("12_0ebru")

Expand Down Expand Up @@ -83,6 +83,7 @@ HSlider/styles/grabber_area = SubResource("StyleBoxFlat_64pwo")
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_64pwo")
HSlider/styles/slider = SubResource("StyleBoxTexture_upa0w")
LeftButton/base_type = &"Button"
LeftButton/styles/disabled = SubResource("StyleBoxTexture_nfv2t")
LeftButton/styles/focus = SubResource("StyleBoxEmpty_2n2so")
LeftButton/styles/hover = SubResource("StyleBoxTexture_nfv2t")
LeftButton/styles/hover_pressed = SubResource("StyleBoxTexture_bnh2f")
Expand All @@ -92,6 +93,7 @@ MarginContainer/icons/texture = ExtResource("2_wr8kl")
ProgressBar/styles/background = SubResource("StyleBoxTexture_umxe3")
ProgressBar/styles/fill = SubResource("StyleBoxTexture_es6xy")
RightButton/base_type = &"Button"
RightButton/styles/disabled = SubResource("StyleBoxTexture_0f342")
RightButton/styles/focus = SubResource("StyleBoxEmpty_xiin7")
RightButton/styles/hover = SubResource("StyleBoxTexture_0f342")
RightButton/styles/hover_pressed = SubResource("StyleBoxTexture_4rt04")
Expand Down

0 comments on commit 38b8392

Please sign in to comment.