forked from team-sg/hero-mark-2
critical heat sound
This commit is contained in:
parent
7cbf467c81
commit
42ada42044
4 changed files with 18 additions and 0 deletions
BIN
audio/sounds/critical_heat.ogg
Normal file
BIN
audio/sounds/critical_heat.ogg
Normal file
Binary file not shown.
15
audio/sounds/critical_heat.ogg.import
Normal file
15
audio/sounds/critical_heat.ogg.import
Normal file
|
@ -0,0 +1,15 @@
|
|||
[remap]
|
||||
|
||||
importer="ogg_vorbis"
|
||||
type="AudioStreamOGGVorbis"
|
||||
path="res://.import/critical_heat.ogg-c4d74947cf30c204bc7abcc93d69d8d3.oggstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://audio/sounds/critical_heat.ogg"
|
||||
dest_files=[ "res://.import/critical_heat.ogg-c4d74947cf30c204bc7abcc93d69d8d3.oggstr" ]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
|
@ -73,6 +73,7 @@ const a_small_explosion = preload("res://audio/sounds/explosion_small.ogg")
|
|||
const a_mech_hurt_1 = preload("res://audio/sounds/mech_hurt_1.ogg")
|
||||
const a_mech_hurt_2 = preload("res://audio/sounds/mech_hurt_2.ogg")
|
||||
const a_mech_hurt_3 = preload("res://audio/sounds/mech_hurt_3.ogg")
|
||||
const a_critical_heat = preload("res://audio/sounds/critical_heat.ogg")
|
||||
|
||||
var loop_section = null
|
||||
var has_looped = false
|
||||
|
|
|
@ -134,6 +134,8 @@ func _on_Shooting_state_physics_processing(delta) -> void:
|
|||
if sg2083.has_method("hurt"):
|
||||
var distance := shoot_range_cast.to_local(shoot_range_cast.get_collision_point()).x
|
||||
var weight := inverse_lerp(shoot_range_cast.cast_to.x, 0.0, distance)
|
||||
if !Audio.ac_climb.is_playing():
|
||||
Audio.play_sound(Audio.a_critical_heat,Audio.ac_climb)
|
||||
sg2083.hurt(breath_dps * weight * delta, true)
|
||||
sg2083.knock_back(breath_knockback * weight * delta, true)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue