ecs attempt

This commit is contained in:
anton.gurov
2019-11-05 16:44:50 +03:00
parent 284cdc5315
commit 096ff2b182
6 changed files with 42 additions and 38 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
"lab.zaar.be/thefish/alchemyst-go/engine/ecs/systems"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap/mapgens"
"lab.zaar.be/thefish/alchemyst-go/engine/gamestate"
@ -112,12 +113,11 @@ func main() {
controller.AddComponent(player, rooms[0].Center) //implicit Coords
render := mob.MobRenderSystem{EntityController: controller}
render := systems.MobRenderSystem{EntityController: controller}
controller.AddSystem(render, 1)
level.Player = player
//but every call to bearlibterminal must be wrapped to closure and passed to mainfunc
var exit = false