This repository has been archived on 2025-01-17. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
blood-and-mortar/scripts/debug_visualization/draw_basis.gd

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)