summaryrefslogtreecommitdiff
path: root/src/world.moon
blob: 2862a9748a27f5d531a1274cad5e4687152c20e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Global state
win = require("window")
hc = require("party.hc.init")
ecs = require("ecs")


print("hc:", hc)
--Use a collider to decide what to render
x = {
	world_e: ecs.Entity(1)
	-- local offsets from the world
	world_x: 0 
	world_y: 0
	-- Have we selected an input type yet?
	controller_selected: false
	-- Level information
	level: {
		graphics:{}
		entities:{}
		graphic_world: hc.new(5)
	}
}
x.level.collider = x.level.graphic_world\rectangle(0,0,1,1/win.width)
x