extends ColorRect

func _ready():
	EventBus.player_dmg.connect(flash_red)
	visible = false
	color.a = 0

func flash_red():
	var tween = create_tween()
	visible = true
	color.a = 0.3
	
	tween.tween_property(self, "color:a", 0.0, 0.2).set_trans(Tween.TRANS_SINE)
	tween.tween_property(self, "visible", false, 0.0);
