hadean-godot/Scripts/Entity.gd

20 lines
303 B
GDScript

@tool
extends Node2D
class_name WorldEntity
var grid: Grid
func _ready():
if Engine.is_editor_hint():
grid = get_tree().edited_scene_root.find_child("Grid")
else:
grid = $/root/Root/Grid
Util.find(Grid)
func _process(_delta):
pass
func _draw():
draw_circle(Vector2.ZERO, 100, Color.WHITE)