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,7 +13,7 @@ func ReadKey() (string, int) {
}
var key = blt.Read()
var pressed = ""
var isModifier, _ = util.InArray(key, modifiers)
var isModifier, _ = util.IntInSlice(key, modifiers)
if !isModifier {
pressed = Scancodemap[key]
@ -38,5 +38,4 @@ func ReadKeyCode() int {
return blt.TK_NONE
}
return blt.Read()
}

View File

@ -3,6 +3,7 @@ package mainwindow
import (
"errors"
"fmt"
"lab.zaar.be/thefish/alchemyst-go/engine/ecs"
"lab.zaar.be/thefish/alchemyst-go/engine/fov"
"lab.zaar.be/thefish/alchemyst-go/engine/fov/precomputed_shade"
"lab.zaar.be/thefish/alchemyst-go/engine/gamestate"
@ -94,7 +95,7 @@ func (vp *ViewPort) Listen(state gamestate.GameState) {
func (vp *ViewPort) Render(state *gamestate.GameState) {
playerCoords := state.Controller.GetComponent(state.Player, types.Coords{}.TypeOf()).(types.Coords)
playerCoords := state.Controller.GetComponent(state.Player, ecs.CoordsComponent).(types.Coords)
vp.Move(state, playerCoords)