17 lines
409 B
GDScript
17 lines
409 B
GDScript
@tool
|
|
extends Node2D
|
|
|
|
|
|
@export var x_length: float = 8.0
|
|
@export var y_length: float = 8.0
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
if Engine.is_editor_hint() and Engine.get_process_frames() % 10 == 0:
|
|
queue_redraw()
|
|
|
|
|
|
func _draw() -> void:
|
|
if Engine.is_editor_hint():
|
|
draw_line(Vector2.ZERO, Vector2(x_length, 0.0), Color.LIGHT_CORAL)
|
|
draw_line(Vector2.ZERO, Vector2(0.0, y_length), Color.LIGHT_GREEN)
|