From 89a8f94ac0206412c1a2d7b8766d97dbdbd36253 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Tue, 21 Jan 2025 16:03:25 -0600 Subject: work --- src/world.moon | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/world.moon') diff --git a/src/world.moon b/src/world.moon index 2862a97..6a0eed8 100644 --- a/src/world.moon +++ b/src/world.moon @@ -12,13 +12,30 @@ x = { world_x: 0 world_y: 0 -- Have we selected an input type yet? - controller_selected: false + controller: { + text_size: 4 + } -- Level information level: { graphics:{} entities:{} graphic_world: hc.new(5) } + sync_time: () -> + am.current_time! } x.level.collider = x.level.graphic_world\rectangle(0,0,1,1/win.width) + +class GraphicsComponent extends ecs.Component + new: (name, properties) => + print("Got name", name, "and properties", properties) + assert(properties and properties.node , "Failed to find node for graphics component") + super(name, properties) + x.node\append(properties.node) + static: () => + @@static + node: () => + @properties.node + +x.GraphicsComponent = GraphicsComponent x -- cgit v1.2.3-70-g09d2