diff --git a/Game/Assets/Characters/Player.gd b/Game/Assets/Characters/Player.gd index fc4b68f..d4b9568 100644 --- a/Game/Assets/Characters/Player.gd +++ b/Game/Assets/Characters/Player.gd @@ -121,6 +121,10 @@ func _ready() -> void: input_active = false $Head/Camera.current = false + $Jetpack/JetpackSound.playing = true + $Jetpack/JetpackSound.stream_paused = true + + func aim(event) -> void: var mouse_motion = event as InputEventMouseMotion @@ -171,6 +175,11 @@ func _input(event) -> void: func _process(delta): $Jetpack/GPUParticles3D.emitting = jetpack_active + if jetpack_active: + $Jetpack/JetpackSound.stream_paused = false + else: + $Jetpack/JetpackSound.stream_paused = true + if not input_active: return diff --git a/Game/Assets/Characters/Player.tscn b/Game/Assets/Characters/Player.tscn index ce4305d..5b3efd0 100644 --- a/Game/Assets/Characters/Player.tscn +++ b/Game/Assets/Characters/Player.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=17 format=3 uid="uid://cwuys43c7ak61"] +[gd_scene load_steps=18 format=3 uid="uid://cwuys43c7ak61"] [ext_resource type="Script" path="res://Assets/Characters/Player.gd" id="1"] [ext_resource type="PackedScene" uid="uid://bemrov0tiy08n" path="res://Assets/Weapons/Weapon.tscn" id="3"] [ext_resource type="Texture2D" uid="uid://cguy76rs8e220" path="res://Assets/Effects/Flame.png" id="3_jw7jd"] +[ext_resource type="AudioStream" uid="uid://bmjh522fpxeee" path="res://Assets/SFX/Player_Jetpack.wav" id="4_k24if"] [sub_resource type="StandardMaterial3D" id="4"] albedo_color = Color(0.545098, 0.545098, 0.545098, 1) @@ -145,10 +146,10 @@ mesh = SubResource( "QuadMesh_355ks" ) particle_flag_rotate_y = true direction = Vector3(0, -1, 0) spread = 0.0 -initial_velocity_min = 3.0 -initial_velocity_max = 3.0 -damping_min = 10.0 -damping_max = 10.0 +initial_velocity_min = 8.0 +initial_velocity_max = 9.0 +damping_min = 25.0 +damping_max = 28.0 angle_min = -180.0 angle_max = 180.0 scale_amount_curve = SubResource( "Curve_elwjc" ) @@ -166,3 +167,13 @@ local_coords = false process_material = SubResource( "ParticlesMaterial_px65a" ) draw_pass_1 = SubResource( "QuadMesh_355ks" ) script = null + +[node name="JetpackSound" type="AudioStreamPlayer3D" parent="Jetpack"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.444909, 0) +stream = ExtResource( "4_k24if" ) +unit_db = -18.0 +unit_size = 4.0 +max_db = -6.0 +pitch_scale = 3.0 +out_of_range_mode = 1 +script = null diff --git a/Game/Assets/SFX/Player_Jetpack.wav b/Game/Assets/SFX/Player_Jetpack.wav new file mode 100644 index 0000000..0056472 --- /dev/null +++ b/Game/Assets/SFX/Player_Jetpack.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20c27bb68b41bdd3e6d0452f2dfd7f5e1b19ce5ec28d43eb7e7d58566cabee00 +size 2440384 diff --git a/Game/Assets/SFX/Player_Jetpack.wav.import b/Game/Assets/SFX/Player_Jetpack.wav.import new file mode 100644 index 0000000..0c1fff6 --- /dev/null +++ b/Game/Assets/SFX/Player_Jetpack.wav.import @@ -0,0 +1,22 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +uid="uid://bmjh522fpxeee" +path="res://.godot/imported/Player_Jetpack.wav-e9ee531cbcf095cd355d30d69a438db0.sample" + +[deps] + +source_file="res://Assets/SFX/Player_Jetpack.wav" +dest_files=["res://.godot/imported/Player_Jetpack.wav-e9ee531cbcf095cd355d30d69a438db0.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=true +compress/mode=0