10 lines
310 B
GDScript
10 lines
310 B
GDScript
extends Enemy
|
|
|
|
func _process(delta: float) -> void:
|
|
super._process(delta)
|
|
queue_redraw()
|
|
|
|
func _draw():
|
|
if current_charge > 0 and target_node:
|
|
var color = Color.RED.lerp(Color.WHITE, current_charge / attack_charge_time)
|
|
draw_dashed_line(Vector2.ZERO, to_local(target_node.global_position), color, 1, 5)
|