Compare commits

..

No commits in common. "073a3083e5e4eeeb5e45d37513b4a0059242f88c" and "ed964981cc57d27fb9f3e59c795d44ff120ac8b3" have entirely different histories.

15 changed files with 9 additions and 180 deletions

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d1ofn1jqfbxpk"
path="res://.godot/imported/apple.wav-a01bb26f0b5c4896b182943a709ad34a.sample"
[deps]
source_file="res://Assets/sounds/apple.wav"
dest_files=["res://.godot/imported/apple.wav-a01bb26f0b5c4896b182943a709ad34a.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ccoi138at5ti1"
path="res://.godot/imported/bonk.wav-aa99158cccd620b22f38a61b11b19720.sample"
[deps]
source_file="res://Assets/sounds/bonk.wav"
dest_files=["res://.godot/imported/bonk.wav-aa99158cccd620b22f38a61b11b19720.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d4bi0dxjmvfyx"
path="res://.godot/imported/change.wav-7680df3c33005109844bcf97c715b6a0.sample"
[deps]
source_file="res://Assets/sounds/change.wav"
dest_files=["res://.godot/imported/change.wav-7680df3c33005109844bcf97c715b6a0.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d0o66pmjueo1x"
path="res://.godot/imported/menu_change.wav-0907e7667575c0342f4eac40c2d561ea.sample"
[deps]
source_file="res://Assets/sounds/menu_change.wav"
dest_files=["res://.godot/imported/menu_change.wav-0907e7667575c0342f4eac40c2d561ea.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://b0wk8jyi64qbd"
path="res://.godot/imported/start.wav-f56cc3e2759d662ff6c2d3258ce259b6.sample"
[deps]
source_file="res://Assets/sounds/start.wav"
dest_files=["res://.godot/imported/start.wav-f56cc3e2759d662ff6c2d3258ce259b6.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

View file

@ -1,15 +1,13 @@
[gd_scene load_steps=7 format=3 uid="uid://drs4bhpd3vrh2"] [gd_scene load_steps=5 format=3 uid="uid://drs4bhpd3vrh2"]
[ext_resource type="Script" path="res://Scripts/GameManager.gd" id="1_lps27"] [ext_resource type="Script" path="res://Scripts/GameManager.gd" id="1_lps27"]
[ext_resource type="Texture2D" uid="uid://vv33w22kwgpc" path="res://Assets/tile.png" id="2_wiemx"] [ext_resource type="Texture2D" uid="uid://vv33w22kwgpc" path="res://Assets/tile.png" id="2_wiemx"]
[ext_resource type="Script" path="res://Scripts/TileColors.gd" id="3_gnesl"] [ext_resource type="Script" path="res://Scripts/TileColors.gd" id="3_gnesl"]
[ext_resource type="AudioStream" uid="uid://d1ofn1jqfbxpk" path="res://Assets/sounds/apple.wav" id="4_a0lry"]
[ext_resource type="AudioStream" uid="uid://ccoi138at5ti1" path="res://Assets/sounds/bonk.wav" id="5_btrdr"]
[sub_resource type="Resource" id="Resource_22g0s"] [sub_resource type="Resource" id="Resource_22g0s"]
script = ExtResource("3_gnesl") script = ExtResource("3_gnesl")
empty = Color(0.294118, 0.337255, 0.301961, 1) empty = Color(0.294118, 0.337255, 0.301961, 1)
snake_head = Color(0.878431, 0.913725, 0.768627, 1) snake_head = Color(0.603922, 0.647059, 0.486275, 1)
snake_body = Color(0.603922, 0.647059, 0.486275, 1) snake_body = Color(0.603922, 0.647059, 0.486275, 1)
apple = Color(0.878431, 0.913725, 0.768627, 1) apple = Color(0.878431, 0.913725, 0.768627, 1)
@ -30,7 +28,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
color = Color(0.145098, 0.145098, 0.145098, 1) color = Color(0.0784314, 0.105882, 0.0666667, 1)
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="."] [node name="AspectRatioContainer" type="AspectRatioContainer" parent="."]
layout_mode = 1 layout_mode = 1
@ -49,9 +47,3 @@ script = ExtResource("1_lps27")
map_size = 10 map_size = 10
texture = ExtResource("2_wiemx") texture = ExtResource("2_wiemx")
tile_color = SubResource("Resource_22g0s") tile_color = SubResource("Resource_22g0s")
[node name="AudioStreamPlayer Eat Apple" type="AudioStreamPlayer" parent="AspectRatioContainer/Map"]
stream = ExtResource("4_a0lry")
[node name="AudioStreamPlayer Bonk" type="AudioStreamPlayer" parent="AspectRatioContainer/Map"]
stream = ExtResource("5_btrdr")

View file

@ -1,10 +1,7 @@
[gd_scene load_steps=6 format=3 uid="uid://c7ok1re4seqsh"] [gd_scene load_steps=3 format=3 uid="uid://c7ok1re4seqsh"]
[ext_resource type="Script" path="res://Scripts/Main Menu Buttons.gd" id="1_abac4"] [ext_resource type="Script" path="res://Scripts/Main Menu Buttons.gd" id="1_abac4"]
[ext_resource type="Theme" uid="uid://clkt54a4wy6tn" path="res://Assets/Base.tres" id="1_b1d2h"] [ext_resource type="Theme" uid="uid://clkt54a4wy6tn" path="res://Assets/Base.tres" id="1_b1d2h"]
[ext_resource type="AudioStream" uid="uid://b0wk8jyi64qbd" path="res://Assets/sounds/start.wav" id="3_bxs37"]
[ext_resource type="AudioStream" uid="uid://d4bi0dxjmvfyx" path="res://Assets/sounds/change.wav" id="4_gb8rx"]
[ext_resource type="AudioStream" uid="uid://d0o66pmjueo1x" path="res://Assets/sounds/menu_change.wav" id="5_xb4d6"]
[node name="Control" type="Control"] [node name="Control" type="Control"]
layout_mode = 3 layout_mode = 3
@ -144,27 +141,10 @@ theme = ExtResource("1_b1d2h")
theme_override_font_sizes/font_size = 96 theme_override_font_sizes/font_size = 96
text = "Back" text = "Back"
[node name="AudioStreamPlayer Start" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_bxs37")
[node name="AudioStreamPlayer Change UI" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_gb8rx")
[node name="AudioStreamPlayer Change Value" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_xb4d6")
[connection signal="focus_entered" from="." to="." method="_on_focus_entered"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button" to="." method="_on_focus_entered"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button" to="." method="_on_start_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button" to="." method="_on_start_button_pressed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Settings Button" to="." method="_on_focus_entered"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Settings Button" to="." method="_on_settings_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Settings Button" to="." method="_on_settings_button_pressed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/About Button" to="." method="_on_focus_entered"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/About Button" to="." method="_on_about_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/About Button" to="." method="_on_about_button_pressed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Quit Button" to="." method="_on_focus_entered"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Quit Button" to="." method="_on_quit_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Menu Butons/Quit Button" to="." method="_on_quit_button_pressed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Settings/GridSize/GridSize_Slider" to="." method="_on_focus_entered"]
[connection signal="value_changed" from="MarginContainer/VBoxContainer/Tab Group/Settings/GridSize/GridSize_Slider" to="." method="_on_grid_size_slider_value_changed"] [connection signal="value_changed" from="MarginContainer/VBoxContainer/Tab Group/Settings/GridSize/GridSize_Slider" to="." method="_on_grid_size_slider_value_changed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Settings/Speed/Speed_Slider" to="." method="_on_focus_entered"]
[connection signal="value_changed" from="MarginContainer/VBoxContainer/Tab Group/Settings/Speed/Speed_Slider" to="." method="_on_speed_slider_value_changed"] [connection signal="value_changed" from="MarginContainer/VBoxContainer/Tab Group/Settings/Speed/Speed_Slider" to="." method="_on_speed_slider_value_changed"]
[connection signal="focus_entered" from="MarginContainer/VBoxContainer/Tab Group/Settings/Back Button" to="." method="_on_focus_entered"]
[connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Settings/Back Button" to="." method="_on_back_button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/Tab Group/Settings/Back Button" to="." method="_on_back_button_pressed"]

View file

@ -80,7 +80,6 @@ func process_tiles():
new_snake_head.state = Tile.States.SNAKE new_snake_head.state = Tile.States.SNAKE
last_snake_move_vector = snake_move_vector last_snake_move_vector = snake_move_vector
if was_apple: if was_apple:
$"AudioStreamPlayer Eat Apple".play()
snake_length += 1 snake_length += 1
generate_apple() generate_apple()
pass pass
@ -119,9 +118,7 @@ func game_start():
pass pass
func game_stop(): func game_stop():
$"AudioStreamPlayer Bonk".play()
game_is_running = false game_is_running = false
await $"AudioStreamPlayer Bonk".finished
get_tree().change_scene_to_file("res://Scene/Main Menu.tscn") get_tree().change_scene_to_file("res://Scene/Main Menu.tscn")
pass pass

View file

@ -22,8 +22,6 @@ func _ready():
func _on_start_button_pressed(): func _on_start_button_pressed():
$"AudioStreamPlayer Start".play()
await $"AudioStreamPlayer Start".finished
get_tree().change_scene_to_file("res://Scene/Game.tscn") get_tree().change_scene_to_file("res://Scene/Game.tscn")
func _on_quit_button_pressed(): func _on_quit_button_pressed():
@ -46,17 +44,12 @@ func _on_back_button_pressed():
$"MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button".grab_focus() $"MarginContainer/VBoxContainer/Tab Group/Menu Butons/Start Button".grab_focus()
func _on_grid_size_slider_value_changed(value): func _on_grid_size_slider_value_changed(value):
$"AudioStreamPlayer Change Value".play()
$"MarginContainer/VBoxContainer/Tab Group/Settings/GridSize/Value".text = " " + str(int(value)) $"MarginContainer/VBoxContainer/Tab Group/Settings/GridSize/Value".text = " " + str(int(value))
config.set_value("Game Play", "grid_size", int(value)) config.set_value("Game Play", "grid_size", int(value))
config.save("user://config.cfg") config.save("user://config.cfg")
func _on_speed_slider_value_changed(value): func _on_speed_slider_value_changed(value):
$"AudioStreamPlayer Change Value".play()
$"MarginContainer/VBoxContainer/Tab Group/Settings/Speed/Value".text = "%10.2f" % value $"MarginContainer/VBoxContainer/Tab Group/Settings/Speed/Value".text = "%10.2f" % value
config.set_value("Game Play", "speed", value) config.set_value("Game Play", "speed", value)
config.save("user://config.cfg") config.save("user://config.cfg")
func _on_focus_entered():
$"AudioStreamPlayer Change UI".play()

View file

@ -24,46 +24,33 @@ window/stretch/aspect="expand"
[input] [input]
ui_accept={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":4194309,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":4194310,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
]
}
ui_select={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null)
]
}
left={ left={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
right={ right={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
up={ up={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":true,"script":null)
] ]
} }
down={ down={
"deadzone": 0.5, "deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null) ]
}
pause={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null)
] ]
} }