footsteps sounds
This commit is contained in:
parent
740d3c9dba
commit
3631e21127
9 changed files with 78 additions and 2 deletions
BIN
assets/Audio/SFX/foot_step_1.wav
Normal file
BIN
assets/Audio/SFX/foot_step_1.wav
Normal file
Binary file not shown.
21
assets/Audio/SFX/foot_step_1.wav.import
Normal file
21
assets/Audio/SFX/foot_step_1.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/foot_step_1.wav-e5bfa642597cfdcbfc1cbbbe178800aa.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Audio/SFX/foot_step_1.wav"
|
||||||
|
dest_files=[ "res://.import/foot_step_1.wav-e5bfa642597cfdcbfc1cbbbe178800aa.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=false
|
||||||
|
compress/mode=0
|
BIN
assets/Audio/SFX/foot_step_2.wav
Normal file
BIN
assets/Audio/SFX/foot_step_2.wav
Normal file
Binary file not shown.
21
assets/Audio/SFX/foot_step_2.wav.import
Normal file
21
assets/Audio/SFX/foot_step_2.wav.import
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamSample"
|
||||||
|
path="res://.import/foot_step_2.wav-b2a1cc7662fdbbb59c158c54078ab489.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/Audio/SFX/foot_step_2.wav"
|
||||||
|
dest_files=[ "res://.import/foot_step_2.wav-b2a1cc7662fdbbb59c158c54078ab489.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=false
|
||||||
|
compress/mode=0
|
|
@ -154,6 +154,8 @@ func _on_landed():
|
||||||
if fall_distance > 150:
|
if fall_distance > 150:
|
||||||
AudioManager.play_sfx(AudioManager.Sfx.PLAYER_LAND)
|
AudioManager.play_sfx(AudioManager.Sfx.PLAYER_LAND)
|
||||||
$Camera.start_shake()
|
$Camera.start_shake()
|
||||||
|
else :
|
||||||
|
play_foot_step_1()
|
||||||
_falling_start_position = position.y
|
_falling_start_position = position.y
|
||||||
emit_signal("landed", position)
|
emit_signal("landed", position)
|
||||||
|
|
||||||
|
@ -343,6 +345,11 @@ func set_position(pos:Vector2):
|
||||||
position = pos
|
position = pos
|
||||||
_falling_start_position = pos.y
|
_falling_start_position = pos.y
|
||||||
|
|
||||||
|
func play_foot_step_1():
|
||||||
|
AudioManager.play_sfx(AudioManager.Sfx.PLAYER_STEP_1)
|
||||||
|
|
||||||
|
func play_foot_step_2():
|
||||||
|
AudioManager.play_sfx(AudioManager.Sfx.PLAYER_STEP_2)
|
||||||
func boost(velocity:Vector2):
|
func boost(velocity:Vector2):
|
||||||
if _state == States.DASHING:
|
if _state == States.DASHING:
|
||||||
_on_DashTimeout_timeout(false)
|
_on_DashTimeout_timeout(false)
|
||||||
|
|
|
@ -600,6 +600,23 @@ tracks/4/keys = {
|
||||||
"update": 1,
|
"update": 1,
|
||||||
"values": [ true ]
|
"values": [ true ]
|
||||||
}
|
}
|
||||||
|
tracks/5/type = "method"
|
||||||
|
tracks/5/path = NodePath(".")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PoolRealArray( 0.3, 0.5 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"values": [ {
|
||||||
|
"args": [ ],
|
||||||
|
"method": "play_foot_step_1"
|
||||||
|
}, {
|
||||||
|
"args": [ ],
|
||||||
|
"method": "play_foot_step_2"
|
||||||
|
} ]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id=12]
|
[sub_resource type="Animation" id=12]
|
||||||
length = 0.3
|
length = 0.3
|
||||||
|
@ -695,7 +712,7 @@ position = Vector2( 0, -8 )
|
||||||
texture = ExtResource( 8 )
|
texture = ExtResource( 8 )
|
||||||
vframes = 13
|
vframes = 13
|
||||||
hframes = 8
|
hframes = 8
|
||||||
frame = 32
|
frame = 13
|
||||||
|
|
||||||
[node name="SordRange" type="Area2D" parent="Sprite"]
|
[node name="SordRange" type="Area2D" parent="Sprite"]
|
||||||
position = Vector2( -8, 8 )
|
position = Vector2( -8, 8 )
|
||||||
|
|
|
@ -2,3 +2,6 @@ extends Level
|
||||||
|
|
||||||
func ready() -> void:
|
func ready() -> void:
|
||||||
$AmbiantLighting.change_light("AREA1")
|
$AmbiantLighting.change_light("AREA1")
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
AudioManager.play_music(AudioManager.Music.Abandon)
|
|
@ -11,6 +11,7 @@ func _ready() -> void:
|
||||||
_player.set_ability("attack", true)
|
_player.set_ability("attack", true)
|
||||||
|
|
||||||
func _enter_tree():
|
func _enter_tree():
|
||||||
|
if AudioManager.current_music() != AudioManager.Music.PreGame:
|
||||||
AudioManager.play_music(AudioManager.Music.PreGame)
|
AudioManager.play_music(AudioManager.Music.PreGame)
|
||||||
|
|
||||||
func _on_OldDudeIntroArea_body_entered(body: Node) -> void:
|
func _on_OldDudeIntroArea_body_entered(body: Node) -> void:
|
||||||
|
|
|
@ -25,6 +25,8 @@ enum Sfx{
|
||||||
COIN_COLLECTION,
|
COIN_COLLECTION,
|
||||||
ORB_COLLECTION,
|
ORB_COLLECTION,
|
||||||
PLAYER_JUMP,
|
PLAYER_JUMP,
|
||||||
|
PLAYER_STEP_1,
|
||||||
|
PLAYER_STEP_2,
|
||||||
PLAYER_LAND,
|
PLAYER_LAND,
|
||||||
PLAYER_DASH,
|
PLAYER_DASH,
|
||||||
PLAYER_ATTACK,
|
PLAYER_ATTACK,
|
||||||
|
@ -41,6 +43,8 @@ var _sfx_files := {
|
||||||
Sfx.COIN_COLLECTION : load("res://assets/Audio/SFX/coin.wav"),
|
Sfx.COIN_COLLECTION : load("res://assets/Audio/SFX/coin.wav"),
|
||||||
Sfx.ORB_COLLECTION : load("res://assets/Audio/SFX/orb.wav"),
|
Sfx.ORB_COLLECTION : load("res://assets/Audio/SFX/orb.wav"),
|
||||||
Sfx.PLAYER_JUMP : load("res://assets/Audio/SFX/player_jump.wav"),
|
Sfx.PLAYER_JUMP : load("res://assets/Audio/SFX/player_jump.wav"),
|
||||||
|
Sfx.PLAYER_STEP_1 : load("res://assets/Audio/SFX/foot_step_1.wav"),
|
||||||
|
Sfx.PLAYER_STEP_2 : load("res://assets/Audio/SFX/foot_step_2.wav"),
|
||||||
Sfx.PLAYER_LAND : load("res://assets/Audio/SFX/player_land.wav"),
|
Sfx.PLAYER_LAND : load("res://assets/Audio/SFX/player_land.wav"),
|
||||||
Sfx.PLAYER_DASH : load("res://assets/Audio/SFX/player_dash.wav"),
|
Sfx.PLAYER_DASH : load("res://assets/Audio/SFX/player_dash.wav"),
|
||||||
Sfx.PLAYER_ATTACK : load("res://assets/Audio/SFX/player_attack.wav"),
|
Sfx.PLAYER_ATTACK : load("res://assets/Audio/SFX/player_attack.wav"),
|
||||||
|
@ -121,3 +125,5 @@ func _on_Tween_completed(object: Object, key: NodePath) -> void:
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func current_music():
|
||||||
|
return _current_music
|
Loading…
Reference in a new issue