sound changes
This commit is contained in:
parent
349de7441e
commit
29bdda6acf
2 changed files with 12 additions and 3 deletions
|
@ -10,11 +10,12 @@
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_vxfel"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_vxfel"]
|
||||||
radius = 12.0
|
radius = 12.0
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("sfx")]
|
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("sfx", "sfx_large")]
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
collision_mask = 51
|
collision_mask = 51
|
||||||
script = ExtResource("1_a6lhy")
|
script = ExtResource("1_a6lhy")
|
||||||
sfx = NodePath("AudioStreamPlayer2D")
|
sfx = NodePath("AudioStreamPlayer2D")
|
||||||
|
sfx_large = NodePath("AudioStreamPlayer2D2")
|
||||||
speed = 250
|
speed = 250
|
||||||
jump_strength = 600
|
jump_strength = 600
|
||||||
|
|
||||||
|
@ -41,7 +42,12 @@ texture_mode = 1
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||||
stream = ExtResource("4_jit8y")
|
stream = ExtResource("4_jit8y")
|
||||||
volume_db = -3.962
|
volume_db = -12.876
|
||||||
pitch_scale = 0.92
|
pitch_scale = 0.92
|
||||||
|
|
||||||
|
[node name="AudioStreamPlayer2D2" type="AudioStreamPlayer2D" parent="."]
|
||||||
|
stream = ExtResource("4_jit8y")
|
||||||
|
volume_db = -12.876
|
||||||
|
pitch_scale = 0.51
|
||||||
|
|
||||||
[connection signal="body_entered" from="Hurtbox" to="." method="_on_hurtbox_body_entered"]
|
[connection signal="body_entered" from="Hurtbox" to="." method="_on_hurtbox_body_entered"]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
extends CharacterBody2D
|
extends CharacterBody2D
|
||||||
|
|
||||||
@export var sfx : AudioStreamPlayer2D
|
@export var sfx : AudioStreamPlayer2D
|
||||||
|
@export var sfx_large : AudioStreamPlayer2D
|
||||||
|
|
||||||
@export var speed = 340
|
@export var speed = 340
|
||||||
@export var gravity = 50
|
@export var gravity = 50
|
||||||
var jump_count = 1
|
var jump_count = 1
|
||||||
|
@ -104,11 +106,12 @@ func _physics_process(delta):
|
||||||
update_cursor()
|
update_cursor()
|
||||||
|
|
||||||
func Jump():
|
func Jump():
|
||||||
sfx.play()
|
|
||||||
if scale.x == 1:
|
if scale.x == 1:
|
||||||
velocity.y = -1 * jump_strength
|
velocity.y = -1 * jump_strength
|
||||||
|
sfx.play()
|
||||||
else :
|
else :
|
||||||
velocity.y = -1 * jump_strength_large
|
velocity.y = -1 * jump_strength_large
|
||||||
|
sfx_large.play()
|
||||||
jump_count = 0
|
jump_count = 0
|
||||||
is_touching_floor = false
|
is_touching_floor = false
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue