add moving animation support, fix debug printing
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
. "openquell/config"
|
||||
"openquell/grid"
|
||||
"openquell/observers"
|
||||
"openquell/util"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
|
||||
@@ -136,7 +137,9 @@ func (system *PlayerSystem) Draw(screen *ebiten.Image) {
|
||||
|
||||
screen.DrawImage(sprite.Image, op)
|
||||
|
||||
ebitenutil.DebugPrintAt(screen, pos.String(), pos.X, pos.Y) // print player pos
|
||||
if util.DebugEnabled() {
|
||||
ebitenutil.DebugPrintAt(screen, pos.SmallString(), pos.X, pos.Y+16) // print player pos
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +213,9 @@ func (system *PlayerSystem) CheckMovement(
|
||||
observer.AddMove()
|
||||
}
|
||||
} else {
|
||||
fmt.Println("------------------------")
|
||||
if util.DebugEnabled() {
|
||||
fmt.Println("------------------------")
|
||||
}
|
||||
slog.Debug("(1) player is at", "current", position.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user