Added pause menu with recipes

This commit is contained in:
akshay committed 2022-08-20 06:11:08 -04:00
1 parent 1b389fc07a
commit d8cdc48c01
10 files changed
+165 -5

No files matched your search

+62 -1
View File
@@ -1,14 +1,73 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scripts/game_manager.gd" type="Script" id=1]
[ext_resource path="res://assets/tutorial/item_recipes.png" type="Texture" id=2]
[ext_resource path="res://assets/tutorial/machine_repair.png" type="Texture" id=3]
[node name="game_manager" type="CanvasLayer" groups=["game_manager"]]
pause_mode = 2
layer = 5
script = ExtResource( 1 )
[node name="UI" type="Control" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 1024, 600 )
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="pause_menu" type="Panel" parent="UI"]
pause_mode = 2
unique_name_in_owner = true
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 989, 509 )
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="resume_button" type="Button" parent="UI/pause_menu"]
pause_mode = 2
unique_name_in_owner = true
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_top = -171.0
margin_right = 63.0
margin_bottom = -151.0
rect_scale = Vector2( 4, 4 )
rect_pivot_offset = Vector2( 30.7864, 9.2928 )
text = "RESUME"
icon_align = 1
expand_icon = true
[node name="machine_repair" type="TextureRect" parent="UI/pause_menu"]
anchor_left = 0.532812
anchor_top = 0.191667
anchor_right = 0.960938
anchor_bottom = 0.762037
margin_left = 6.10352e-05
rect_pivot_offset = Vector2( -754, 325 )
texture = ExtResource( 3 )
expand = true
stretch_mode = 1
__meta__ = {
"_edit_use_anchors_": true
}
[node name="item_recipe" type="TextureRect" parent="UI/pause_menu"]
anchor_left = 0.043
anchor_top = 0.27
anchor_right = 0.49
anchor_bottom = 0.718
margin_left = -0.560005
margin_top = 0.399994
margin_right = 0.199951
margin_bottom = -0.440063
rect_pivot_offset = Vector2( 1777, -206.5 )
texture = ExtResource( 2 )
expand = true
stretch_mode = 6
[node name="day_timer_text" type="Label" parent="UI"]
unique_name_in_owner = true
@@ -25,6 +84,8 @@ align = 2
uppercase = true
[node name="day_timer" type="Timer" parent="."]
pause_mode = 1
unique_name_in_owner = true
[connection signal="pressed" from="UI/pause_menu/resume_button" to="." method="_on_resume_button_pressed"]
[connection signal="timeout" from="day_timer" to="." method="_on_day_timer_timeout"]
+5 -3
View File
@@ -250,9 +250,6 @@ script = ExtResource( 8 )
target = NodePath("../Player")
size = 4.0
[node name="game_manager" parent="." instance=ExtResource( 7 )]
time_per_day = 300.0
[node name="power_station" parent="." instance=ExtResource( 14 )]
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 1, 0 )
time_to_generate = 5.0
@@ -402,9 +399,14 @@ transform = Transform( -0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, -0.707107,
start_broken = true
[node name="CanvasLayer" type="CanvasLayer" parent="."]
pause_mode = 1
visible = false
[node name="cheat_menu" parent="CanvasLayer" instance=ExtResource( 18 )]
[node name="game_manager" parent="." instance=ExtResource( 7 )]
time_per_day = 300.0
[connection signal="player_entered" from="cameras/camera_room_center" to="cameras" method="_on_camera_room_player_entered"]
[connection signal="player_exited" from="cameras/camera_room_center" to="cameras" method="_on_camera_room_player_exited"]
[connection signal="area_entered" from="cameras/camera_room_center/hitbox" to="cameras/camera_room_center" method="_on_hitbox_area_entered"]
+10 -1
View File
@@ -714,7 +714,7 @@ mesh = SubResource( 1 )
skin = SubResource( 2 )
[node name="head_bone" type="BoneAttachment" parent="model_transform/DungMan/Armature/Skeleton" index="1"]
transform = Transform( 1, -2.20707e-16, -2.35891e-17, 2.74492e-19, -0.105045, 0.994467, -2.21964e-16, -0.994467, -0.105045, -3.31838e-16, -0.0380623, -1.50372 )
transform = Transform( 1, -2.22118e-16, -9.47951e-19, -2.04242e-19, -0.00518723, 0.999986, -2.2212e-16, -0.999986, -0.00518723, -3.33247e-16, 0.00719897, -1.50005 )
bone_name = "Item"
[node name="ItemSpawn" type="Spatial" parent="model_transform/DungMan/Armature/Skeleton/head_bone"]
@@ -774,14 +774,17 @@ pause_mode = 2
[node name="Control" type="Control" parent="UI"]
margin_right = 40.0
margin_bottom = 40.0
mouse_filter = 2
[node name="TextureRect" type="TextureRect" parent="UI/Control"]
margin_right = 565.0
margin_bottom = 164.0
mouse_filter = 2
texture = SubResource( 21 )
expand = true
[node name="MarginContainer" type="MarginContainer" parent="UI/Control"]
mouse_filter = 2
custom_constants/margin_right = 16
custom_constants/margin_top = 16
custom_constants/margin_left = 16
@@ -793,12 +796,14 @@ margin_left = 16.0
margin_top = 16.0
margin_right = 540.0
margin_bottom = 144.0
mouse_filter = 2
[node name="stomach0" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
material = SubResource( 28 )
margin_right = 128.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 128, 821 )
mouse_filter = 2
texture = ExtResource( 3 )
[node name="stomach1" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
@@ -807,6 +812,7 @@ margin_left = 132.0
margin_right = 260.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 128, 821 )
mouse_filter = 2
texture = ExtResource( 3 )
[node name="stomach2" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
@@ -815,6 +821,7 @@ margin_left = 264.0
margin_right = 392.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 128, 821 )
mouse_filter = 2
texture = ExtResource( 3 )
[node name="stomach3" type="TextureRect" parent="UI/Control/MarginContainer/stomachs"]
@@ -823,12 +830,14 @@ margin_left = 396.0
margin_right = 524.0
margin_bottom = 128.0
rect_pivot_offset = Vector2( 128, 821 )
mouse_filter = 2
texture = ExtResource( 3 )
[node name="blackout" type="ColorRect" parent="UI"]
modulate = Color( 1, 1, 1, 0 )
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 0, 0, 0, 1 )
[node name="ZZZ" type="Label" parent="UI"]