fix supid viewport bug

This commit is contained in:
2019-11-01 19:59:12 +03:00
parent 529f5a5749
commit 17ef52a5cf
5 changed files with 29 additions and 14 deletions

View File

@ -1,6 +1,9 @@
package mob
import "lab.zaar.be/thefish/alchemyst-go/engine/types"
import (
"fmt"
"lab.zaar.be/thefish/alchemyst-go/engine/types"
)
type Mob struct {
*types.Appearance
@ -9,7 +12,8 @@ type Mob struct {
}
func (m *Mob) Walk(dx, dy int) {
m.Coords = types.Coords{m.X + dx, m.Y + dy}
fmt.Printf("new coords: %d, %d\n", m.Coords.X, m.Coords.Y)
}
func (m *Mob) Render() {