From 915d20005baeccdcae3434b666c17c0e2f30d035 Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Sun, 20 Aug 2023 17:12:21 -0600 Subject: [PATCH 1/2] a --- godot/Level/Island.tscn | 2 ++ godot/Textures/kill.png | 3 +++ godot/Textures/kill.png.import | 34 ++++++++++++++++++++++++++++++++++ godot/Textures/redo.png | 3 +++ godot/Textures/redo.png.import | 34 ++++++++++++++++++++++++++++++++++ godot/UI/PauseMenu.gd | 10 ++++++++++ godot/UI/PauseMenu.tscn | 11 ++++++++++- godot/global.gd | 3 +++ godot/project.godot | 4 ++++ 9 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 godot/Textures/kill.png create mode 100644 godot/Textures/kill.png.import create mode 100644 godot/Textures/redo.png create mode 100644 godot/Textures/redo.png.import create mode 100644 godot/global.gd diff --git a/godot/Level/Island.tscn b/godot/Level/Island.tscn index 0f3c94a..e59fbff 100644 --- a/godot/Level/Island.tscn +++ b/godot/Level/Island.tscn @@ -495,6 +495,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.31447, 2.55588, -2.13044) [node name="Node3D" parent="." instance=ExtResource("29_etvc6")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.41845, 9.26863, -2.62281) +[node name="Node3D2" type="Node3D" parent="."] + [connection signal="finished" from="Music" to="Music" method="_on_finished"] [connection signal="timeout" from="Music/Transition" to="Music" method="_on_transition_timer_timeout"] [connection signal="timeout" from="Music/Tween" to="Music" method="_on_tween_timer_timeout"] diff --git a/godot/Textures/kill.png b/godot/Textures/kill.png new file mode 100644 index 0000000..d81bcd2 --- /dev/null +++ b/godot/Textures/kill.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1f484101efd3511308573523e7da8481b4236037d93dc1cc4ac4c67c9d9f73 +size 622 diff --git a/godot/Textures/kill.png.import b/godot/Textures/kill.png.import new file mode 100644 index 0000000..8591300 --- /dev/null +++ b/godot/Textures/kill.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cali86gqly7e3" +path="res://.godot/imported/kill.png-e4f5f842049185427e5a508f24a44118.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/kill.png" +dest_files=["res://.godot/imported/kill.png-e4f5f842049185427e5a508f24a44118.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/godot/Textures/redo.png b/godot/Textures/redo.png new file mode 100644 index 0000000..30c24a1 --- /dev/null +++ b/godot/Textures/redo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2ba00701e13477c51570a85a10484511982464732b5e0489dbf452b33122dac +size 588 diff --git a/godot/Textures/redo.png.import b/godot/Textures/redo.png.import new file mode 100644 index 0000000..f2941a3 --- /dev/null +++ b/godot/Textures/redo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5l5hur0x6nx0" +path="res://.godot/imported/redo.png-2705bf6a1fcf83551fb9c16401980fe8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/redo.png" +dest_files=["res://.godot/imported/redo.png-2705bf6a1fcf83551fb9c16401980fe8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/godot/UI/PauseMenu.gd b/godot/UI/PauseMenu.gd index 0308602..a68f78c 100644 --- a/godot/UI/PauseMenu.gd +++ b/godot/UI/PauseMenu.gd @@ -27,3 +27,13 @@ func pause(): func quit(): get_tree().quit() + + +func _on_kill_pressed(): + pass # Replace with function body. + + + +func _on_restart_pressed(): + toggle() + get_tree().reload_current_scene() diff --git a/godot/UI/PauseMenu.tscn b/godot/UI/PauseMenu.tscn index bf31ee3..e4b4bd2 100644 --- a/godot/UI/PauseMenu.tscn +++ b/godot/UI/PauseMenu.tscn @@ -1,8 +1,10 @@ -[gd_scene load_steps=4 format=3 uid="uid://cbca7q18ae42h"] +[gd_scene load_steps=6 format=3 uid="uid://cbca7q18ae42h"] [ext_resource type="Script" path="res://UI/PauseMenu.gd" id="1_3puj1"] [ext_resource type="Texture2D" uid="uid://dxxd258q3uomg" path="res://UI/Play.png" id="1_c4do0"] [ext_resource type="Texture2D" uid="uid://hgb2ifbdpp3" path="res://UI/Exit.png" id="3_djmuk"] +[ext_resource type="Texture2D" uid="uid://b5l5hur0x6nx0" path="res://Textures/redo.png" id="3_wl7bl"] +[ext_resource type="Texture2D" uid="uid://cali86gqly7e3" path="res://Textures/kill.png" id="4_cr4ot"] [node name="PauseMenu" type="Control"] process_mode = 3 @@ -59,6 +61,11 @@ icon_alignment = 1 [node name="Restart" type="Button" parent="CenterContainer/HBoxContainer"] layout_mode = 2 +icon = ExtResource("3_wl7bl") + +[node name="Kill" type="Button" parent="CenterContainer/HBoxContainer"] +layout_mode = 2 +icon = ExtResource("4_cr4ot") [node name="QuitButton" type="Button" parent="CenterContainer/HBoxContainer"] process_mode = 3 @@ -76,4 +83,6 @@ flat = true icon_alignment = 1 [connection signal="pressed" from="CenterContainer/HBoxContainer/ResumeButton" to="." method="unpause"] +[connection signal="pressed" from="CenterContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"] +[connection signal="pressed" from="CenterContainer/HBoxContainer/Kill" to="." method="_on_kill_pressed"] [connection signal="pressed" from="CenterContainer/HBoxContainer/QuitButton" to="." method="quit"] diff --git a/godot/global.gd b/godot/global.gd new file mode 100644 index 0000000..1c891bc --- /dev/null +++ b/godot/global.gd @@ -0,0 +1,3 @@ +extends Node + +var cheating = false diff --git a/godot/project.godot b/godot/project.godot index 2b031d8..4ecc685 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -15,6 +15,10 @@ run/main_scene="res://UI/TitleScreen.tscn" config/features=PackedStringArray("4.1", "Forward Plus") config/icon="res://icon.svg" +[autoload] + +Global="*res://global.gd" + [display] window/size/viewport_width=512 From cded78e677c81a9d388078180d7a973f12b53fa6 Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Sun, 20 Aug 2023 17:18:44 -0600 Subject: [PATCH 2/2] pause --- godot/Level/Island.tscn | 6 +++++- godot/MeshInstance3D.gd | 4 ++++ godot/UI/PauseMenu.gd | 3 ++- godot/cultist.tscn | 14 +++++++++++++- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 godot/MeshInstance3D.gd diff --git a/godot/Level/Island.tscn b/godot/Level/Island.tscn index e59fbff..61ecafe 100644 --- a/godot/Level/Island.tscn +++ b/godot/Level/Island.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=34 format=3 uid="uid://3d51hjh2st8a"] +[gd_scene load_steps=35 format=3 uid="uid://3d51hjh2st8a"] [ext_resource type="PackedScene" uid="uid://d2d4uv7o5gx5p" path="res://Level/World/screen_shader.tscn" id="1_huyen"] [ext_resource type="PackedScene" uid="uid://d3ccrfjpg4hbv" path="res://Models/palm_curved.tscn" id="3_bth2b"] @@ -29,6 +29,7 @@ [ext_resource type="PackedScene" uid="uid://g4gmc0pwlak1" path="res://Models/buildings/fence.tscn" id="28_prydb"] [ext_resource type="PackedScene" uid="uid://ckbba1bs71tl" path="res://crate.tscn" id="28_x0lrj"] [ext_resource type="PackedScene" path="res://spawner.tscn" id="29_etvc6"] +[ext_resource type="PackedScene" uid="uid://e0s4phx2jiit" path="res://cultist.tscn" id="30_8gvtc"] [sub_resource type="Animation" id="Animation_jpnyu"] resource_name = "waves" @@ -497,6 +498,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.41845, 9.26863, -2.62281) [node name="Node3D2" type="Node3D" parent="."] +[node name="Cultist" parent="." instance=ExtResource("30_8gvtc")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.10096, 2.40767, -1.07752) + [connection signal="finished" from="Music" to="Music" method="_on_finished"] [connection signal="timeout" from="Music/Transition" to="Music" method="_on_transition_timer_timeout"] [connection signal="timeout" from="Music/Tween" to="Music" method="_on_tween_timer_timeout"] diff --git a/godot/MeshInstance3D.gd b/godot/MeshInstance3D.gd new file mode 100644 index 0000000..fc40428 --- /dev/null +++ b/godot/MeshInstance3D.gd @@ -0,0 +1,4 @@ +extends MeshInstance3D + +func _process(_delta): + visible = Global.cheating diff --git a/godot/UI/PauseMenu.gd b/godot/UI/PauseMenu.gd index a68f78c..f32ca5c 100644 --- a/godot/UI/PauseMenu.gd +++ b/godot/UI/PauseMenu.gd @@ -30,7 +30,8 @@ func quit(): func _on_kill_pressed(): - pass # Replace with function body. + Global.cheating = true + toggle() diff --git a/godot/cultist.tscn b/godot/cultist.tscn index 5edde08..e6a096d 100644 --- a/godot/cultist.tscn +++ b/godot/cultist.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=7 format=3 uid="uid://e0s4phx2jiit"] +[gd_scene load_steps=10 format=3 uid="uid://e0s4phx2jiit"] [ext_resource type="Script" path="res://cultist.gd" id="1_k6djk"] [ext_resource type="PackedScene" uid="uid://c3q6fva1c1baa" path="res://Models/slime.tscn" id="2_004fn"] [ext_resource type="AudioStream" uid="uid://cxadu5w3jwv0b" path="res://Sounds/evilslime.ogg" id="3_novm4"] +[ext_resource type="Script" path="res://MeshInstance3D.gd" id="4_trs5a"] [sub_resource type="SphereShape3D" id="SphereShape3D_rypky"] radius = 2.5 @@ -13,6 +14,11 @@ radius = 0.055 [sub_resource type="SphereShape3D" id="SphereShape3D_bmc5i"] radius = 0.05 +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y5n1c"] +albedo_color = Color(1, 0, 1, 1) + +[sub_resource type="SphereMesh" id="SphereMesh_75ex5"] + [node name="Cultist" type="CharacterBody3D"] script = ExtResource("1_k6djk") @@ -38,5 +44,11 @@ shape = SubResource("SphereShape3D_bmc5i") [node name="evilslime" type="AudioStreamPlayer3D" parent="."] stream = ExtResource("3_novm4") +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(0.05, 0, 0, 0, 0.05, 0, 0, 0, 0.05, 0, 0.181789, 0) +material_override = SubResource("StandardMaterial3D_y5n1c") +mesh = SubResource("SphereMesh_75ex5") +script = ExtResource("4_trs5a") + [connection signal="body_entered" from="TargetRadius" to="." method="_on_target_radius_body_entered"] [connection signal="body_entered" from="CollisionDetection" to="." method="_on_collision_detection_body_entered"]