Getting Stuff Together #42

Merged
Snoweuph merged 17 commits from dev-base into stable 2023-04-09 17:21:29 +00:00
23 changed files with 93 additions and 130 deletions
Showing only changes of commit 7d3778486a - Show all commits

View file

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://6snf183fgfo5" uid="uid://6snf183fgfo5"
path="res://.godot/imported/Cross.png-a35d7d54d47ceec63c1f7d015bd7540a.ctex" path="res://.godot/imported/Cross.png-cb47f197658081aa6b3b2436216091d8.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Assets/Sprites/Cross.png" source_file="res://Assets/Sprites/UI Elements/Cross.png"
dest_files=["res://.godot/imported/Cross.png-a35d7d54d47ceec63c1f7d015bd7540a.ctex"] dest_files=["res://.godot/imported/Cross.png-cb47f197658081aa6b3b2436216091d8.ctex"]
[params] [params]

View file

After

Width:  |  Height:  |  Size: 563 B

View file

@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cnrja43wk2mmd" uid="uid://cp84ssaqs3pmp"
path="res://.godot/imported/Jesus.png-03798d7c17250d4d3d3b4253b34b9eae.ctex" path="res://.godot/imported/Jesus.png-4b77d6b073d02e874b45321d0948eaf8.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://Assets/Sprites/Jesus.png" source_file="res://Assets/Sprites/UI Elements/Jesus.png"
dest_files=["res://.godot/imported/Jesus.png-03798d7c17250d4d3d3b4253b34b9eae.ctex"] dest_files=["res://.godot/imported/Jesus.png-4b77d6b073d02e874b45321d0948eaf8.ctex"]
[params] [params]

View file

@ -1,8 +1,8 @@
[gd_scene load_steps=4 format=3] [gd_scene load_steps=4 format=3 uid="uid://bbog8pmtkefhq"]
[ext_resource type="Script" path="res://Scripts/SettingsMenu.gd" id="1_2rgd2"] [ext_resource type="Script" path="res://Scripts/UI/SettingsMenu.gd" id="1_2rgd2"]
[ext_resource type="Theme" uid="uid://o3vg845para" path="res://Assets/UI_Theme.tres" id="2_swcn6"] [ext_resource type="Theme" uid="uid://o3vg845para" path="res://Assets/UI_Theme.tres" id="2_swcn6"]
[ext_resource type="Script" path="res://Scripts/RemapButton.gd" id="3_gktg3"] [ext_resource type="Script" path="res://Scripts/UI/RemapButton.gd" id="3_gktg3"]
[node name="SettingsMenu" type="Node" node_paths=PackedStringArray("display_options_button", "vsync_toggle", "resolutions_options_button", "master_volume_slider", "music_volume_slider", "sfx_volume_slider")] [node name="SettingsMenu" type="Node" node_paths=PackedStringArray("display_options_button", "vsync_toggle", "resolutions_options_button", "master_volume_slider", "music_volume_slider", "sfx_volume_slider")]
script = ExtResource("1_2rgd2") script = ExtResource("1_2rgd2")
@ -50,6 +50,8 @@ theme_override_font_sizes/font_size = 29
[node name="Video" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"] [node name="Video" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"]
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../Controls")
focus_neighbor_right = NodePath("../Audio")
[node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Video"] [node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Video"]
custom_minimum_size = Vector2(0, 425) custom_minimum_size = Vector2(0, 425)
@ -121,6 +123,8 @@ fit_to_longest_item = false
[node name="Audio" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"] [node name="Audio" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"]
visible = false visible = false
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../Video")
focus_neighbor_right = NodePath("../Controls")
[node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Audio"] [node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Audio"]
custom_minimum_size = Vector2(0, 425) custom_minimum_size = Vector2(0, 425)
@ -184,6 +188,8 @@ max_value = 0.0
[node name="Controls" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"] [node name="Controls" type="VBoxContainer" parent="MainVBox/TabsContainer/SettingsTabs"]
visible = false visible = false
layout_mode = 2 layout_mode = 2
focus_neighbor_left = NodePath("../Audio")
focus_neighbor_right = NodePath("../Video")
[node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Controls"] [node name="MarginContainer" type="MarginContainer" parent="MainVBox/TabsContainer/SettingsTabs/Controls"]
custom_minimum_size = Vector2(0, 425) custom_minimum_size = Vector2(0, 425)

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://csxh42o8twxwn"] [gd_scene load_steps=4 format=3 uid="uid://csxh42o8twxwn"]
[ext_resource type="Script" path="res://Scripts/WeaponSystem/Projectile.gd" id="1_os652"] [ext_resource type="Script" path="res://Scripts/WeaponSystem/Projectile.gd" id="1_os652"]
[ext_resource type="Texture2D" uid="uid://c5jj6s5orw6mi" path="res://Assets/Sprites/crucefix.png" id="2_ibs3t"] [ext_resource type="Texture2D" uid="uid://dlxjdb0tchrps" path="res://Assets/Sprites/crucefix.png" id="2_ibs3t"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ki5cp"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ki5cp"]
radius = 8.57143 radius = 8.57143

View file

@ -1,20 +1,24 @@
[gd_scene load_steps=12 format=3 uid="uid://c061h8kte43oy"] [gd_scene load_steps=14 format=3 uid="uid://4fysk8vaw3e1"]
[ext_resource type="Script" path="res://Scripts/MainMenuManager.gd" id="1_0vcve"] [ext_resource type="Script" path="res://Scripts/UI/MainMenuManager.gd" id="1_qepq0"]
[ext_resource type="Script" path="res://Scripts/MenuButton.gd" id="1_croa2"] [ext_resource type="Texture2D" uid="uid://tjxkew3m4v8m" path="res://Assets/Sprites/Easter Egg/Shadow.png" id="2_8o6th"]
[ext_resource type="Texture2D" uid="uid://6snf183fgfo5" path="res://Assets/Sprites/Cross.png" id="1_joe3h"] [ext_resource type="PackedScene" uid="uid://c4btepmue6d7p" path="res://Scenes/Game.tscn" id="2_28004"]
[ext_resource type="Texture2D" uid="uid://tjxkew3m4v8m" path="res://Assets/Sprites/Easter Egg/Shadow.png" id="4_8qs7j"] [ext_resource type="Texture2D" uid="uid://daat37cyg0go5" path="res://Assets/Sprites/Easter Egg/Egg 3.png" id="3_1e3fe"]
[ext_resource type="Texture2D" uid="uid://daat37cyg0go5" path="res://Assets/Sprites/Easter Egg/Egg 3.png" id="5_1ocdn"] [ext_resource type="PackedScene" uid="uid://bbog8pmtkefhq" path="res://Prefabs/Settings Menu.tscn" id="3_r3r61"]
[ext_resource type="Texture2D" uid="uid://dhvvw4yckl8x7" path="res://Assets/Sprites/Props/Cake.png" id="5_5gyoe"] [ext_resource type="Texture2D" uid="uid://dhvvw4yckl8x7" path="res://Assets/Sprites/Props/Cake.png" id="5_7ull8"]
[ext_resource type="Texture2D" uid="uid://cnrja43wk2mmd" path="res://Assets/Sprites/Jesus.png" id="6_ag6vh"] [ext_resource type="Texture2D" uid="uid://c3yg6u8yncau3" path="res://Assets/Sprites/Easter Egg/Egg 2.png" id="6_45o7d"]
[ext_resource type="Theme" uid="uid://o3vg845para" path="res://Assets/UI_Theme.tres" id="8_4mc3t"] [ext_resource type="Texture2D" uid="uid://cp84ssaqs3pmp" path="res://Assets/Sprites/UI Elements/Jesus.png" id="6_wnx18"]
[ext_resource type="Texture2D" uid="uid://c3yg6u8yncau3" path="res://Assets/Sprites/Easter Egg/Egg 2.png" id="8_cha7m"] [ext_resource type="Texture2D" uid="uid://dkotcqflp3e32" path="res://Assets/Sprites/Easter Egg/Egg 1.png" id="7_285vd"]
[ext_resource type="Texture2D" uid="uid://dkotcqflp3e32" path="res://Assets/Sprites/Easter Egg/Egg 1.png" id="9_ujgvg"] [ext_resource type="Theme" uid="uid://o3vg845para" path="res://Assets/UI_Theme.tres" id="8_lr748"]
[ext_resource type="PackedScene" uid="uid://ck2ggeynybwdb" path="res://Scenes/MusicPlayer.tscn" id="12_x3k6e"] [ext_resource type="Script" path="res://Scripts/UI/MenuButton.gd" id="9_2cu5l"]
[ext_resource type="Texture2D" uid="uid://6snf183fgfo5" path="res://Assets/Sprites/UI Elements/Cross.png" id="12_dhfc0"]
[ext_resource type="AudioStream" uid="uid://c6nf5s6xy2uii" path="res://Assets/Temp Music/omw-to-beat-the-big-bad.wav" id="13_3j724"]
[node name="MainMenu" type="Node" node_paths=PackedStringArray("button_to_focus_on_start")] [node name="MainMenu" type="Node" node_paths=PackedStringArray("default_focus")]
script = ExtResource("1_0vcve") script = ExtResource("1_qepq0")
button_to_focus_on_start = NodePath("MainVBox/ButtonsVbox/PlayButton") game_scene = ExtResource("2_28004")
settings_scene = ExtResource("3_r3r61")
default_focus = NodePath("MainVBox/ButtonsVbox/PlayButton")
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
anchors_preset = 15 anchors_preset = 15
@ -42,22 +46,22 @@ grow_vertical = 2
[node name="Shadow" type="Sprite2D" parent="Decorations/Left Decor"] [node name="Shadow" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(226.563, 338.875) position = Vector2(226.563, 338.875)
scale = Vector2(22.7773, 15.6953) scale = Vector2(22.7773, 15.6953)
texture = ExtResource("4_8qs7j") texture = ExtResource("2_8o6th")
[node name="Egg3" type="Sprite2D" parent="Decorations/Left Decor"] [node name="Egg3" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(134, 477) position = Vector2(134, 477)
scale = Vector2(4.6875, 4.625) scale = Vector2(4.6875, 4.625)
texture = ExtResource("5_1ocdn") texture = ExtResource("3_1e3fe")
[node name="Jesus" type="Sprite2D" parent="Decorations/Left Decor"] [node name="Jesus" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(220, 335) position = Vector2(220, 335)
scale = Vector2(7.0431, 6.97321) scale = Vector2(7.0431, 6.97321)
texture = ExtResource("6_ag6vh") texture = ExtResource("6_wnx18")
[node name="Cake" type="Sprite2D" parent="Decorations/Left Decor"] [node name="Cake" type="Sprite2D" parent="Decorations/Left Decor"]
position = Vector2(310, 491) position = Vector2(310, 491)
scale = Vector2(2.59375, 2.32031) scale = Vector2(2.59375, 2.32031)
texture = ExtResource("5_5gyoe") texture = ExtResource("5_7ull8")
[node name="Right Decor" type="CenterContainer" parent="Decorations"] [node name="Right Decor" type="CenterContainer" parent="Decorations"]
custom_minimum_size = Vector2(576, 0) custom_minimum_size = Vector2(576, 0)
@ -72,18 +76,18 @@ grow_vertical = 2
[node name="Shadow2" type="Sprite2D" parent="Decorations/Right Decor"] [node name="Shadow2" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(351, 403) position = Vector2(351, 403)
scale = Vector2(19.0938, 11.8125) scale = Vector2(19.0938, 11.8125)
texture = ExtResource("4_8qs7j") texture = ExtResource("2_8o6th")
[node name="Egg2" type="Sprite2D" parent="Decorations/Right Decor"] [node name="Egg2" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(294, 487) position = Vector2(294, 487)
rotation = -1.5708 rotation = -1.5708
scale = Vector2(4.89203, 5.21732) scale = Vector2(4.89203, 5.21732)
texture = ExtResource("8_cha7m") texture = ExtResource("6_45o7d")
[node name="Egg1" type="Sprite2D" parent="Decorations/Right Decor"] [node name="Egg1" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(420.75, 471.25) position = Vector2(420.75, 471.25)
scale = Vector2(4.89062, 4.95313) scale = Vector2(4.89062, 4.95313)
texture = ExtResource("9_ujgvg") texture = ExtResource("7_285vd")
[node name="GoodBunny" type="Sprite2D" parent="Decorations/Right Decor"] [node name="GoodBunny" type="Sprite2D" parent="Decorations/Right Decor"]
position = Vector2(331, 458.5) position = Vector2(331, 458.5)
@ -96,7 +100,7 @@ anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme = ExtResource("8_4mc3t") theme = ExtResource("8_lr748")
[node name="CenterContainer" type="CenterContainer" parent="MainVBox"] [node name="CenterContainer" type="CenterContainer" parent="MainVBox"]
custom_minimum_size = Vector2(0, 150) custom_minimum_size = Vector2(0, 150)
@ -125,7 +129,7 @@ focus_neighbor_bottom = NodePath("../SettingsButton")
focus_next = NodePath("../SettingsButton") focus_next = NodePath("../SettingsButton")
focus_previous = NodePath("../QuitButton") focus_previous = NodePath("../QuitButton")
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
script = ExtResource("1_croa2") script = ExtResource("9_2cu5l")
text = "Play" text = "Play"
pointer_margin_from_center = 80 pointer_margin_from_center = 80
leftPointer = NodePath("LeftPointer") leftPointer = NodePath("LeftPointer")
@ -148,13 +152,13 @@ text = "[center]Play[/center]"
visible = false visible = false
position = Vector2(502, 12) position = Vector2(502, 12)
rotation = 1.5708 rotation = 1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/PlayButton"] [node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/PlayButton"]
visible = false visible = false
position = Vector2(650, 12) position = Vector2(650, 12)
rotation = -1.5708 rotation = -1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="SettingsButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")] [node name="SettingsButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")]
custom_minimum_size = Vector2(0, 40) custom_minimum_size = Vector2(0, 40)
@ -166,7 +170,7 @@ focus_neighbor_bottom = NodePath("../AboutButton")
focus_next = NodePath("../AboutButton") focus_next = NodePath("../AboutButton")
focus_previous = NodePath("../PlayButton") focus_previous = NodePath("../PlayButton")
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
script = ExtResource("1_croa2") script = ExtResource("9_2cu5l")
text = "Settings" text = "Settings"
pointer_margin_from_center = 130 pointer_margin_from_center = 130
leftPointer = NodePath("LeftPointer") leftPointer = NodePath("LeftPointer")
@ -189,13 +193,13 @@ text = "[center]Settings[/center]"
visible = false visible = false
position = Vector2(502, 12) position = Vector2(502, 12)
rotation = 1.5708 rotation = 1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/SettingsButton"] [node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/SettingsButton"]
visible = false visible = false
position = Vector2(650, 12) position = Vector2(650, 12)
rotation = -1.5708 rotation = -1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="AboutButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")] [node name="AboutButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")]
custom_minimum_size = Vector2(0, 40) custom_minimum_size = Vector2(0, 40)
@ -207,7 +211,7 @@ focus_neighbor_bottom = NodePath("../QuitButton")
focus_next = NodePath("../QuitButton") focus_next = NodePath("../QuitButton")
focus_previous = NodePath("../SettingsButton") focus_previous = NodePath("../SettingsButton")
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
script = ExtResource("1_croa2") script = ExtResource("9_2cu5l")
text = "About" text = "About"
pointer_margin_from_center = 95 pointer_margin_from_center = 95
leftPointer = NodePath("LeftPointer") leftPointer = NodePath("LeftPointer")
@ -230,13 +234,13 @@ text = "[center]About[/center]"
visible = false visible = false
position = Vector2(502, 12) position = Vector2(502, 12)
rotation = 1.5708 rotation = 1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/AboutButton"] [node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/AboutButton"]
visible = false visible = false
position = Vector2(650, 12) position = Vector2(650, 12)
rotation = -1.5708 rotation = -1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="QuitButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")] [node name="QuitButton" type="TextureButton" parent="MainVBox/ButtonsVbox" node_paths=PackedStringArray("leftPointer", "rightPointer", "textBox")]
custom_minimum_size = Vector2(0, 40) custom_minimum_size = Vector2(0, 40)
@ -248,7 +252,7 @@ focus_neighbor_bottom = NodePath("../PlayButton")
focus_next = NodePath("../PlayButton") focus_next = NodePath("../PlayButton")
focus_previous = NodePath("../AboutButton") focus_previous = NodePath("../AboutButton")
mouse_default_cursor_shape = 2 mouse_default_cursor_shape = 2
script = ExtResource("1_croa2") script = ExtResource("9_2cu5l")
text = "Quit" text = "Quit"
pointer_margin_from_center = 80 pointer_margin_from_center = 80
leftPointer = NodePath("LeftPointer") leftPointer = NodePath("LeftPointer")
@ -271,15 +275,18 @@ text = "[center]Quit[/center]"
visible = false visible = false
position = Vector2(502, 12) position = Vector2(502, 12)
rotation = 1.5708 rotation = 1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/QuitButton"] [node name="RightPointer" type="Sprite2D" parent="MainVBox/ButtonsVbox/QuitButton"]
visible = false visible = false
position = Vector2(650, 12) position = Vector2(650, 12)
rotation = -1.5708 rotation = -1.5708
texture = ExtResource("1_joe3h") texture = ExtResource("12_dhfc0")
[node name="MusicPlayer" parent="." instance=ExtResource("12_x3k6e")] [node name="MusicPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("13_3j724")
autoplay = true
bus = &"Music"
[connection signal="pressed" from="MainVBox/ButtonsVbox/PlayButton" to="." method="_on_play_button_pressed"] [connection signal="pressed" from="MainVBox/ButtonsVbox/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="pressed" from="MainVBox/ButtonsVbox/SettingsButton" to="." method="_on_settings_button_pressed"] [connection signal="pressed" from="MainVBox/ButtonsVbox/SettingsButton" to="." method="_on_settings_button_pressed"]

View file

@ -1,8 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://ck2ggeynybwdb"]
[ext_resource type="AudioStream" uid="uid://c6nf5s6xy2uii" path="res://Assets/Temp Music/omw-to-beat-the-big-bad.wav" id="1_wb1gf"]
[node name="MusicPlayer" type="AudioStreamPlayer"]
stream = ExtResource("1_wb1gf")
autoplay = true
bus = &"Music"

View file

@ -1,42 +0,0 @@
[gd_scene load_steps=7 format=3 uid="uid://ccgpsim5nfxd6"]
[ext_resource type="Script" path="res://Scripts/PlayerController.gd" id="1_x3102"]
[ext_resource type="TileSet" uid="uid://b7cqbf6xdbeal" path="res://Assets/Test_Tileset.tres" id="3_0at2g"]
[ext_resource type="Script" path="res://Scripts/MapGenerator.gd" id="4_8st0q"]
[ext_resource type="Texture2D" uid="uid://cnrja43wk2mmd" path="res://Assets/Sprites/Jesus.png" id="4_lpajj"]
[ext_resource type="PackedScene" path="res://Scenes/MusicPlayer.tscn" id="5_4vnv3"]
[ext_resource type="AudioStream" uid="uid://dpbyjnyg765r7" path="res://Assets/Temp Music/awesomeness.wav" id="6_2do7l"]
[node name="Node2D" type="Node2D"]
[node name="TileMap" type="TileMap" parent="."]
tile_set = ExtResource("3_0at2g")
cell_quadrant_size = 8
collision_visibility_mode = 1
format = 2
script = ExtResource("4_8st0q")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(512, 300)
scale = Vector2(0.25, 0.25)
script = ExtResource("1_x3102")
speed = 80
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
position = Vector2(0.75, 3.99997)
scale = Vector2(1.05172, 1)
texture = ExtResource("4_lpajj")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="CharacterBody2D"]
polygon = PackedVector2Array(16, 32, -14, 32, -12, -24, 16, -24)
[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]
zoom = Vector2(10, 10)
position_smoothing_enabled = true
drag_horizontal_enabled = true
drag_vertical_enabled = true
editor_draw_limits = true
editor_draw_drag_margin = true
[node name="MusicPlayer" parent="." instance=ExtResource("5_4vnv3")]
stream = ExtResource("6_2do7l")

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://cd45icxf4gxpp"] [gd_scene load_steps=16 format=3 uid="uid://cugui0mjc6cfe"]
[ext_resource type="TileSet" uid="uid://bj7uu2180mie3" path="res://Assets/Tileset.tres" id="1_s4utw"] [ext_resource type="TileSet" uid="uid://bj7uu2180mie3" path="res://Assets/Tileset.tres" id="1_s4utw"]
[ext_resource type="Script" path="res://Scripts/MapGenerator.gd" id="2_yhpwh"] [ext_resource type="Script" path="res://Scripts/MapGenerator.gd" id="2_yhpwh"]

View file

@ -44,13 +44,13 @@ func _of_collision(body):
if body != self: collisions-= 1 if body != self: collisions-= 1
pass pass
func damage(damage : int): func damage(damage_amount : int):
health -= damage health -= damage_amount
if(health <= 0): on_death() if(health <= 0): on_death()
pass pass
func heal(health : int): func heal(health_amount : int):
self.health += health self.health += health_amount
pass pass
func on_death(): func on_death():

View file

@ -27,6 +27,6 @@ func spawn_wave(free_tiles : Array, team: int, amount : int, health : int) -> Ar
for i in amount: for i in amount:
var pos = free_tiles.pick_random() var pos = free_tiles.pick_random()
free_tiles.erase(pos) free_tiles.erase(pos)
var bunny = spawn_bunny(pos, team, 3) var bunny = spawn_bunny(pos, team, health)
bunnys.push_back(bunny) bunnys.push_back(bunny)
return bunnys return bunnys

View file

@ -12,7 +12,7 @@ func _ready():
print("time for generation: " + str(gen_data.time)) print("time for generation: " + str(gen_data.time))
pass pass
func _process(delta): func _process(_delta):
if(bunnys.size() == 0): if(bunnys.size() == 0):
wave += 1 wave += 1
bunnys = bunny_generator.spawn_wave(gen_data.free_tiles.duplicate(), TEAM.EVIL, wave * 500, 3) bunnys = bunny_generator.spawn_wave(gen_data.free_tiles.duplicate(), TEAM.EVIL, wave * 500, 3)

View file

@ -69,7 +69,8 @@ func set_borders_solid():
pass pass
func prepare_player_start_area(): func prepare_player_start_area():
var center = Vector2i(width/2, height/2) @warning_ignore("integer_division")
var center = Vector2i(width / 2, height / 2)
for x in range(center.x - start_area_size, center.x + start_area_size): for x in range(center.x - start_area_size, center.x + start_area_size):
# Getting a P factor for the corner "radius" Decission # Getting a P factor for the corner "radius" Decission

View file

@ -1,8 +1,8 @@
extends Node extends Node
@export var game_scene_path : String = "res://Scenes/PlayerMovement.tscn" @export var game_scene : Resource
@export var options_scene_path : String = "res://Scenes/SettingsMenu.tscn" @export var settings_scene : Resource
@export var button_to_focus_on_start : TextureButton @export var default_focus : TextureButton
# Engine Callbackss # Engine Callbackss
func _ready(): func _ready():
@ -12,17 +12,17 @@ func _ready():
GlobalSettings.update_master_volume(Save.game_data.master_volume) GlobalSettings.update_master_volume(Save.game_data.master_volume)
GlobalSettings.update_music_volume(Save.game_data.music_volume) GlobalSettings.update_music_volume(Save.game_data.music_volume)
GlobalSettings.update_sfx_volume(Save.game_data.sfx_volume) GlobalSettings.update_sfx_volume(Save.game_data.sfx_volume)
button_to_focus_on_start.grab_focus() default_focus.grab_focus()
pass pass
func _on_play_button_pressed(): func _on_play_button_pressed():
get_tree().change_scene_to_file(game_scene_path) load(game_scene.resource_path)
get_tree().change_scene_to_file(game_scene.resource_path)
pass pass
func _on_settings_button_pressed(): func _on_settings_button_pressed():
var options_scene = load(options_scene_path).instantiate() var settings_scene_instance = load(settings_scene.resource_path).instantiate()
get_tree().current_scene.add_child(options_scene) get_tree().current_scene.add_child(settings_scene_instance)
pass pass
func _on_about_button_pressed(): func _on_about_button_pressed():

View file

@ -1,4 +1,3 @@
extends TextureButton extends TextureButton
@export var text : String = "Sample Text" @export var text : String = "Sample Text"
@ -12,11 +11,10 @@ func _ready():
textBox.parse_bbcode("[center] %s [/center]" % [text]) textBox.parse_bbcode("[center] %s [/center]" % [text])
pass pass
func _process(delta): func _process(_delta):
handle_hover_and_focus() handle_hover_and_focus()
handle_x_position() handle_x_position()
func handle_hover_and_focus() -> void: func handle_hover_and_focus() -> void:
if has_focus(): if has_focus():
leftPointer.visible = true leftPointer.visible = true
@ -33,7 +31,6 @@ func handle_hover_and_focus() -> void:
rightPointer.modulate.a = 1 rightPointer.modulate.a = 1
pass pass
func handle_x_position() -> void: func handle_x_position() -> void:
var center_x = get_parent().position.x + (get_parent().size.x / 2.0) var center_x = get_parent().position.x + (get_parent().size.x / 2.0)
leftPointer.global_position.x = center_x - pointer_margin_from_center leftPointer.global_position.x = center_x - pointer_margin_from_center

View file

@ -11,7 +11,6 @@ func _unhandled_key_input(event):
remap_key(event) remap_key(event)
pass pass
func display_key (): func display_key ():
text = "%s" % InputMap.action_get_events(input_action_name)[0].as_text() text = "%s" % InputMap.action_get_events(input_action_name)[0].as_text()
pass pass
@ -23,8 +22,8 @@ func remap_key(event):
text = "%s" % event.as_text() text = "%s" % event.as_text()
pass pass
func _on_toggled(button_pressed): func _on_toggled(is_button_pressed):
set_process_unhandled_key_input(button_pressed) set_process_unhandled_key_input(is_button_pressed)
if button_pressed: text = "..." if is_button_pressed: text = "..."
else: display_key() else: display_key()
pass pass

View file

@ -11,16 +11,16 @@ func _process(delta):
pass pass
func _on_collision(body): func _on_collision(body):
var collision_layer = null; var collided_layer = null;
if body.get_class() == "TileMap": if body.get_class() == "TileMap":
collision_layer = body.tile_set.get_physics_layer_collision_layer(0) collided_layer = body.tile_set.get_physics_layer_collision_layer(0)
if(body.has_method("get_collision_layer")): if(body.has_method("get_collision_layer")):
collision_layer = body.get_collision_layer() collided_layer = body.get_collision_layer()
if collision_layer & map_collision_layer: if collided_layer & map_collision_layer:
queue_free() queue_free()
if collision_layer & bunny_collision_layer: if collided_layer & bunny_collision_layer:
var bunny = body as Bunny var bunny = body as Bunny
bunny.damage(damage) bunny.damage(damage)
queue_free() queue_free()

View file

@ -3,7 +3,7 @@ extends Node2D
@export var projectile_prefab : Resource @export var projectile_prefab : Resource
@onready var projectilePrefab : PackedScene = load(projectile_prefab.resource_path) @onready var projectilePrefab : PackedScene = load(projectile_prefab.resource_path)
func _process(delta): func _process(_delta):
rotate_to_pointer() rotate_to_pointer()
if Input.is_action_just_pressed("attack"): if Input.is_action_just_pressed("attack"):
@ -18,5 +18,8 @@ func spawn_projectile(pos : Vector2, dir : float, speed: float, damage : int):
var projectile = projectilePrefab.instantiate() var projectile = projectilePrefab.instantiate()
projectile.global_position = pos projectile.global_position = pos
projectile.rotation = dir projectile.rotation = dir
projectile.speed = speed
projectile.damage = damage
projectile.is_displayed_folded()
get_tree().root.add_child(projectile) get_tree().root.add_child(projectile)
pass pass

View file

@ -11,7 +11,7 @@ config_version=5
[application] [application]
config/name="HoppyEaster" config/name="HoppyEaster"
run/main_scene="res://Scenes/Test.tscn" run/main_scene="res://Scenes/Main Menu.tscn"
config/features=PackedStringArray("4.0", "GL Compatibility") config/features=PackedStringArray("4.0", "GL Compatibility")
config/icon="res://icon.svg" config/icon="res://icon.svg"
@ -21,8 +21,8 @@ buses/default_bus_layout="res://Assets/Temp Music/default_bus_layout.tres"
[autoload] [autoload]
GlobalSettings="*res://Scripts/GlobalSettings.gd" GlobalSettings="*res://Scripts/SaveSystem/GlobalSettings.gd"
Save="*res://Scripts/GameDataSaver.gd" Save="*res://Scripts/SaveSystem/GameDataSaver.gd"
[display] [display]