diff options
Diffstat (limited to 'src/world.moon')
| -rw-r--r-- | src/world.moon | 19 |
1 files changed, 18 insertions, 1 deletions
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 |
