forked from team-sg/hero-mark-2
I HATE YOU
This commit is contained in:
parent
b3f1a30d13
commit
8e8869ba9f
16 changed files with 89 additions and 24 deletions
|
@ -67,6 +67,16 @@ func hurt(amount: float) -> void:
|
|||
func _attack() -> void:
|
||||
var sg2083 := get_node(sg2083_path)
|
||||
if sg2083.has_method("hurt"):
|
||||
var r = RandomNumberGenerator.new()
|
||||
r.randomize()
|
||||
var snd = r.randi_range(0,2)
|
||||
match snd:
|
||||
0:
|
||||
Audio.play_sound(Audio.a_mech_hurt_1,Audio.ac_die)
|
||||
1:
|
||||
Audio.play_sound(Audio.a_mech_hurt_2,Audio.ac_die)
|
||||
2:
|
||||
Audio.play_sound(Audio.a_mech_hurt_3,Audio.ac_die)
|
||||
sg2083.hurt(punch_damage)
|
||||
sg2083.knock_back(punch_knockback)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue