1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-21 23:34:18 +00:00

Fix things

This commit is contained in:
Steffo 2023-10-02 01:12:11 +02:00
parent 4cb232fb38
commit 0d06d95123
Signed by: steffo
GPG key ID: 2A24051445686895
7 changed files with 79 additions and 49 deletions

View file

@ -3,7 +3,7 @@
".godot": true, ".godot": true,
"**/*.godot": true, "**/*.godot": true,
"**/*.tres": true, "**/*.tres": true,
"**/*.tscn": false, "**/*.tscn": true,
"**/*.import": true, "**/*.import": true,
}, },
"files.associations": { "files.associations": {

View file

@ -1,4 +1,4 @@
[gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://b2edg3n5pyluh"] [gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://bod31bw3e7e5p"]
[sub_resource type="AudioEffectAmplify" id="AudioEffectAmplify_l4qbw"] [sub_resource type="AudioEffectAmplify" id="AudioEffectAmplify_l4qbw"]
resource_name = "Amplify" resource_name = "Amplify"

View file

@ -69,7 +69,6 @@ clip_contents = false
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
scroll_vertical = 100
horizontal_scroll_mode = 0 horizontal_scroll_mode = 0
vertical_scroll_mode = 2 vertical_scroll_mode = 2

View file

@ -1,5 +1,5 @@
extends Node extends Node
class_name Root class_name Main
@onready var tree: SceneTree = get_tree() @onready var tree: SceneTree = get_tree()

64
main.tscn Normal file
View file

@ -0,0 +1,64 @@
[gd_scene load_steps=6 format=3 uid="uid://dqm0h5h0baqcg"]
[ext_resource type="Script" path="res://main.gd" id="1_fqt34"]
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="1_je7w1"]
[ext_resource type="PackedScene" uid="uid://c3rxmcwa5nqng" path="res://game/game.tscn" id="2_32lou"]
[ext_resource type="PackedScene" uid="uid://cklkdygv61bny" path="res://interface/shop_ui.tscn" id="2_qj86l"]
[ext_resource type="PackedScene" uid="uid://bo5unrhqpoyim" path="res://interface/game_ui.tscn" id="4_siim3"]
[node name="Main" type="Node" node_paths=PackedStringArray("game_ui", "shop_ui")]
script = ExtResource("1_fqt34")
game_ui = NodePath("UI/GameUI")
shop_ui = NodePath("UI/ShopUI")
[node name="UI" type="Control" parent="."]
texture_filter = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 8
theme = ExtResource("1_je7w1")
[node name="CenterContainer" type="CenterContainer" parent="UI"]
custom_minimum_size = Vector2(270, 480)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="SubViewportContainer" type="SubViewportContainer" parent="UI/CenterContainer"]
layout_mode = 2
[node name="SubViewport" type="SubViewport" parent="UI/CenterContainer/SubViewportContainer"]
disable_3d = true
handle_input_locally = false
size = Vector2i(270, 480)
render_target_update_mode = 4
[node name="Game" parent="UI/CenterContainer/SubViewportContainer/SubViewport" instance=ExtResource("2_32lou")]
[node name="Camera2D" type="Camera2D" parent="UI/CenterContainer/SubViewportContainer/SubViewport"]
anchor_mode = 0
[node name="GameUI" parent="UI" instance=ExtResource("4_siim3")]
layout_mode = 1
[node name="ShopUI" parent="UI" instance=ExtResource("2_qj86l")]
process_mode = 3
visible = false
layout_mode = 1
[connection signal="score_button_pressed" from="UI/GameUI" to="." method="_on_game_ui_score_button_pressed"]
[connection signal="shop_button_pressed" from="UI/GameUI" to="." method="_on_game_ui_shop_button_pressed"]
[connection signal="spawn_button_pressed" from="UI/GameUI" to="UI/CenterContainer/SubViewportContainer/SubViewport/Game" method="trigger_spawn"]
[connection signal="back_button_pressed" from="UI/ShopUI" to="." method="_on_shop_ui_back_button_pressed"]
[connection signal="delete_button_pressed" from="UI/ShopUI" to="." method="_on_shop_ui_delete_button_pressed"]
[connection signal="purchase_begin" from="UI/ShopUI" to="." method="_on_shop_ui_purchase_begin"]
[connection signal="purchase_cancel" from="UI/ShopUI" to="." method="_on_shop_ui_purchase_cancel"]
[connection signal="purchase_success" from="UI/ShopUI" to="." method="_on_shop_ui_purchase_success"]
[connection signal="score_button_pressed" from="UI/ShopUI" to="." method="_on_shop_ui_score_button_pressed"]

View file

@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="ld54" config/name="ld54"
run/main_scene="res://root.tscn" run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.1", "Mobile") config/features=PackedStringArray("4.1", "Mobile")
boot_splash/bg_color=Color(0.0977035, 0.0977035, 0.10161, 1) boot_splash/bg_color=Color(0.0977035, 0.0977035, 0.10161, 1)
boot_splash/image="res://icon.png" boot_splash/image="res://icon.png"

View file

@ -1,29 +1,13 @@
[gd_scene load_steps=6 format=3 uid="uid://cbccs6kwwf265"] [gd_scene load_steps=4 format=3 uid="uid://cbccs6kwwf265"]
[ext_resource type="Script" path="res://root.gd" id="1_8jrhk"] [ext_resource type="Script" path="res://main.gd" id="1_ncl4v"]
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="1_h26ax"]
[ext_resource type="PackedScene" uid="uid://c3rxmcwa5nqng" path="res://game/game.tscn" id="3_hrdyr"] [ext_resource type="PackedScene" uid="uid://c3rxmcwa5nqng" path="res://game/game.tscn" id="3_hrdyr"]
[ext_resource type="PackedScene" uid="uid://cklkdygv61bny" path="res://interface/shop_ui.tscn" id="3_lvefk"]
[ext_resource type="PackedScene" uid="uid://bo5unrhqpoyim" path="res://interface/game_ui.tscn" id="5_2cc15"] [ext_resource type="PackedScene" uid="uid://bo5unrhqpoyim" path="res://interface/game_ui.tscn" id="5_2cc15"]
[node name="Root" type="Node" node_paths=PackedStringArray("game_ui", "shop_ui")] [node name="Root" type="Node"]
script = ExtResource("1_8jrhk") script = ExtResource("1_ncl4v")
game_ui = NodePath("View/SafeUI/GameUI")
shop_ui = NodePath("View/SafeUI/ShopUI")
[node name="UI" type="Control" parent="."] [node name="View@CenterUI" type="CenterContainer" parent="."]
texture_filter = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 8
theme = ExtResource("1_h26ax")
[node name="CenterUI" type="CenterContainer" parent="View"]
layout_mode = 1
anchors_preset = 7 anchors_preset = 7
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 1.0 anchor_top = 1.0
@ -32,43 +16,26 @@ anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
[node name="ViewportContainer" type="SubViewportContainer" parent="View/CenterUI"] [node name="View@CenterUI@ViewportContainer" type="SubViewportContainer" parent="."]
custom_minimum_size = Vector2(270, 480) custom_minimum_size = Vector2(270, 480)
layout_mode = 2
stretch = true stretch = true
[node name="Viewport" type="SubViewport" parent="View/CenterUI/ViewportContainer"] [node name="View@CenterUI@ViewportContainer@Viewport" type="SubViewport" parent="."]
handle_input_locally = false handle_input_locally = false
size = Vector2i(270, 480) size = Vector2i(270, 480)
render_target_update_mode = 4 render_target_update_mode = 4
[node name="Game" parent="View/CenterUI/ViewportContainer/Viewport" instance=ExtResource("3_8gkpc")] [node name="View@CenterUI@ViewportContainer@Viewport@Game" parent="." instance=ExtResource("3_hrdyr")]
[node name="Camera2D" type="Camera2D" parent="View/CenterUI/ViewportContainer/Viewport"] [node name="View@CenterUI@ViewportContainer@Viewport@Camera2D" type="Camera2D" parent="."]
anchor_mode = 0 anchor_mode = 0
[node name="SafeUI" type="MarginContainer" parent="View"] [node name="View@SafeUI" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("4_grf0c")
[node name="GameUI" parent="View/SafeUI" instance=ExtResource("5_2cc15")] [node name="View@SafeUI@GameUI" parent="." instance=ExtResource("5_2cc15")]
process_mode = 3 process_mode = 3
layout_mode = 1
[node name="ShopUI" parent="UI" instance=ExtResource("3_lvefk")]
process_mode = 3
visible = false
layout_mode = 1
[connection signal="score_button_pressed" from="View/SafeUI/GameUI" to="." method="_on_game_ui_score_button_pressed"]
[connection signal="shop_button_pressed" from="View/SafeUI/GameUI" to="." method="_on_game_ui_shop_button_pressed"]
[connection signal="spawn_button_pressed" from="View/SafeUI/GameUI" to="View/CenterUI/ViewportContainer/Viewport/Game" method="trigger_spawn"]
[connection signal="back_button_pressed" from="View/SafeUI/ShopUI" to="." method="_on_shop_ui_back_button_pressed"]
[connection signal="delete_button_pressed" from="View/SafeUI/ShopUI" to="." method="_on_shop_ui_delete_button_pressed"]
[connection signal="purchase_begin" from="View/SafeUI/ShopUI" to="." method="_on_shop_ui_purchase_begin"]
[connection signal="score_button_pressed" from="View/SafeUI/ShopUI" to="." method="_on_shop_ui_score_button_pressed"]