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

--Use a collider to decide what to render
x = {
	world_e: ecs.Entity(1)
	world_x: 0
	world_y: 0
	controller_selected: false
	hosting: false
	peer_channels: {}
	network_proposed: {}
	network_commited: {}
	level: {
		graphics:{}
		entities:{}
		graphic_world: hc.new(5)
	}
}
x.level.collider = x.level.graphic_world\rectangle(0,0,1,1/win.width)
x