diff --git a/Game/Assets/Weapons/Handgun/Handgun.tscn b/Game/Assets/Weapons/Handgun/Handgun.tscn index ee0dabb..83bb216 100644 --- a/Game/Assets/Weapons/Handgun/Handgun.tscn +++ b/Game/Assets/Weapons/Handgun/Handgun.tscn @@ -83,19 +83,45 @@ stream = ExtResource( 6 ) [node name="Shoot" type="Spatial" parent="Sounds"] script = ExtResource( 3 ) -[node name="A" type="Spatial" parent="Sounds/Shoot"] - -[node name="SoundPlayer" parent="Sounds/Shoot/A" instance=ExtResource( 7 )] +[node name="A" parent="Sounds/Shoot" instance=ExtResource( 7 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_A.wav" +RandomizePitch = 0.05 -[node name="B" type="Spatial" parent="Sounds/Shoot"] +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/A" index="0"] +unit_size = 3.0 +emission_angle_enabled = true +emission_angle_degrees = 60.0 +emission_angle_filter_attenuation_db = -6.0 +attenuation_filter_cutoff_hz = 15000.0 +attenuation_filter_db = -6.0 -[node name="SoundPlayer" parent="Sounds/Shoot/B" instance=ExtResource( 7 )] +[node name="B" parent="Sounds/Shoot" instance=ExtResource( 7 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_B.wav" +RandomizePitch = 0.05 -[node name="C" type="Spatial" parent="Sounds/Shoot"] +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/B" index="0"] +unit_size = 2.0 +emission_angle_enabled = true +emission_angle_degrees = 60.0 +emission_angle_filter_attenuation_db = -6.0 +attenuation_filter_cutoff_hz = 15000.0 +attenuation_filter_db = -6.0 -[node name="SoundPlayer" parent="Sounds/Shoot/C" instance=ExtResource( 7 )] +[node name="C" parent="Sounds/Shoot" instance=ExtResource( 7 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_C.wav" +RandomizePitch = 0.05 + +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/C" index="0"] +emission_angle_enabled = true +emission_angle_degrees = 60.0 +emission_angle_filter_attenuation_db = -6.0 +attenuation_filter_cutoff_hz = 15000.0 +attenuation_filter_db = -6.0 [editable path="Handgun"] + +[editable path="Sounds/Shoot/A"] + +[editable path="Sounds/Shoot/B"] + +[editable path="Sounds/Shoot/C"] diff --git a/Game/Classes/Audio/LayeredSoundPlayer.gd b/Game/Classes/Audio/LayeredSoundPlayer.gd index 257adcf..9f19355 100644 --- a/Game/Classes/Audio/LayeredSoundPlayer.gd +++ b/Game/Classes/Audio/LayeredSoundPlayer.gd @@ -7,9 +7,9 @@ extends Spatial func play(): - $A/SoundPlayer.play() - $B/SoundPlayer.play() - $C/SoundPlayer.play() + $A.play() + $B.play() + $C.play() # Called when the node enters the scene tree for the first time. func _ready(): diff --git a/Game/Classes/Player/Player.tscn b/Game/Classes/Player/Player.tscn index fd98f67..9b1448b 100644 --- a/Game/Classes/Player/Player.tscn +++ b/Game/Classes/Player/Player.tscn @@ -220,7 +220,7 @@ script = ExtResource( 8 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.53592, -0.0651628 ) [node name="Hand" type="Spatial" parent="Camera"] -transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.39248, -0.559 ) +transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.335, -0.395968, -0.559 ) [node name="WeaponBobAnimationTree" type="AnimationTree" parent="Camera/Hand"] tree_root = SubResource( 12 ) diff --git a/Game/Menu.tscn b/Game/Menu.tscn new file mode 100644 index 0000000..c594fac --- /dev/null +++ b/Game/Menu.tscn @@ -0,0 +1,134 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://assets/NotoSansUI_Regular.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://addons/Trail/trail3d_icon.svg" type="Texture" id=2] +[ext_resource path="res://addons/Trail/trail2d_icon.svg" type="Texture" id=3] + +[sub_resource type="GDScript" id=1] +script/source = "extends Control + + + + +func _on_btn1_button_down(): + get_tree().change_scene(\"res://level.tscn\") + + +func _on_btn2_button_down(): + get_tree().change_scene(\"res://navmesh.tscn\") + + +func _on_btn3_button_down(): + get_tree().change_scene(\"res://demo_3d_1.tscn\") + + +func _on_btn4_button_down(): + get_tree().change_scene(\"res://demo_3d_2.tscn\") + + +func _on_btn_quit_button_down(): + get_tree().quit() + + +" + +[sub_resource type="DynamicFont" id=2] +size = 64 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 1 ) + +[sub_resource type="DynamicFont" id=3] +size = 18 +use_mipmaps = true +use_filter = true +font_data = ExtResource( 1 ) + +[node name="Control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = SubResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="panel" type="Panel" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="title" type="Label" parent="panel"] +anchor_right = 1.0 +margin_left = 20.0 +margin_top = 20.0 +margin_right = -20.0 +margin_bottom = 14.0 +custom_fonts/font = SubResource( 2 ) +text = "Trail System Demo" +align = 1 +valign = 1 + +[node name="vbc" type="VBoxContainer" parent="panel"] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 220.0 +margin_top = -347.0 +margin_right = -220.0 +margin_bottom = -50.0 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="btn1" type="Button" parent="panel/vbc"] +margin_right = 584.0 +margin_bottom = 32.0 +custom_fonts/font = SubResource( 3 ) +text = "[2D] Navigation Mesh" +icon = ExtResource( 3 ) + +[node name="btn2" type="Button" parent="panel/vbc"] +margin_top = 42.0 +margin_right = 584.0 +margin_bottom = 74.0 +custom_fonts/font = SubResource( 3 ) +text = "[3D] Navigation Mesh" +icon = ExtResource( 2 ) + +[node name="btn3" type="Button" parent="panel/vbc"] +margin_top = 84.0 +margin_right = 584.0 +margin_bottom = 116.0 +custom_fonts/font = SubResource( 3 ) +text = "[3D] Projectile trail" +icon = ExtResource( 2 ) + +[node name="btn4" type="Button" parent="panel/vbc"] +margin_top = 126.0 +margin_right = 584.0 +margin_bottom = 158.0 +custom_fonts/font = SubResource( 3 ) +text = "[3D] Character Sword/Capoeira" +icon = ExtResource( 2 ) + +[node name="spacer" type="Control" parent="panel/vbc"] +margin_top = 168.0 +margin_right = 584.0 +margin_bottom = 255.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="btn_quit" type="Button" parent="panel/vbc"] +margin_top = 265.0 +margin_right = 584.0 +margin_bottom = 297.0 +custom_fonts/font = SubResource( 3 ) +text = "Quit" +[connection signal="button_down" from="panel/vbc/btn1" to="." method="_on_btn1_button_down"] +[connection signal="button_down" from="panel/vbc/btn2" to="." method="_on_btn2_button_down"] +[connection signal="button_down" from="panel/vbc/btn3" to="." method="_on_btn3_button_down"] +[connection signal="button_down" from="panel/vbc/btn4" to="." method="_on_btn4_button_down"] +[connection signal="button_down" from="panel/vbc/btn_quit" to="." method="_on_btn_quit_button_down"]