14 lines
378 B
GDScript
14 lines
378 B
GDScript
class_name FeedbackCanvasModulate
|
|
extends CanvasModulate
|
|
|
|
|
|
var is_tweening = false
|
|
|
|
func show_hurt_feedback():
|
|
if is_tweening: return
|
|
is_tweening = true
|
|
var default_color = color
|
|
var tween = create_tween()
|
|
tween.tween_property(self, "color", Color(1.0,0,0, .2), .1)
|
|
tween.tween_property(self, "color", default_color, .3)
|
|
tween.tween_callback(func(): is_tweening = false)
|