Improved animation and bullet detection for heart shot ending.
This commit is contained in:
parent
5bf3078953
commit
b12558a846
6 changed files with 14 additions and 3 deletions
|
|
@ -4,4 +4,9 @@ func _ready() -> void:
|
|||
EventBus.heart_beat.connect(_on_heart_beat)
|
||||
|
||||
func _on_heart_beat(tempo: float):
|
||||
$AnimationPlayer.set_speed_scale(tempo)
|
||||
if tempo == 0:
|
||||
$AnimationPlayer.stop()
|
||||
var tween = create_tween().set_trans(Tween.TRANS_LINEAR)
|
||||
tween.tween_property(self, "modulate",Color(0,0,0), 2.5)
|
||||
elif tempo > 0:
|
||||
$AnimationPlayer.set_speed_scale(tempo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue