reflection goes out of the window

This commit is contained in:
2019-11-10 01:24:45 +03:00
parent bc00262ead
commit f442dc6921
16 changed files with 87 additions and 63 deletions

View File

@ -13,11 +13,11 @@ type MobRenderSystem struct {
func (mrs MobRenderSystem) Process(){
for e := range mrs.EntityController.GetEntities() {
if mrs.EntityController.HasComponent(e, types.Coords{}.TypeOf()) &&
mrs.EntityController.HasComponent(e, types.Appearance{}.TypeOf()) {
if mrs.EntityController.HasComponent(e, ecs.CoordsComponent) &&
mrs.EntityController.HasComponent(e, ecs.AppearanceComponent) {
pos := mrs.EntityController.GetComponent(e, types.Coords{}.TypeOf()).(types.Coords)
appearance := mrs.EntityController.GetComponent(e, types.Appearance{}.TypeOf()).(types.Appearance)
pos := mrs.EntityController.GetComponent(e, ecs.CoordsComponent).(types.Coords)
appearance := mrs.EntityController.GetComponent(e, ecs.AppearanceComponent).(types.Appearance)
//fixme
// Clear the cell this entity occupies, so it is the only glyph drawn there
@ -30,4 +30,8 @@ func (mrs MobRenderSystem) Process(){
//gogue.PrintGlyph(pos.X, pos.Y, appearance.Glyph, "", appearance.Layer)
}
}
}
func (mrs MobRenderSystem) SystemType() string {
return ecs.MobRenderSystem
}