aboutsummaryrefslogtreecommitdiff
path: root/move.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-10-06 06:38:59 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-10-06 06:38:59 +0200
commit7b805f2bcc3b25c9077ec39fc0693091a4e05b0a (patch)
treeeaf44ffde0c765bf7e0973ae65a9dee534edb2d5 /move.go
parent7e80b9cc8535973be68a1444843ecfc81d3ff355 (diff)
fix(move): Draw move from start
Diffstat (limited to 'move.go')
-rw-r--r--move.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/move.go b/move.go
index 2568e53..f9a54a3 100644
--- a/move.go
+++ b/move.go
@@ -210,7 +210,7 @@ func DrawMove(screen *ebiten.Image, e *Entity) {
last := e.Position.Value
dx := +e.Image.Value.Bounds().Dx() / 2
dy := +e.Image.Value.Bounds().Dy() / 2
- for _, point := range e.Move.Value.Path[1:] {
+ for _, point := range e.Move.Value.Path {
vector.StrokeLine(screen, float32(last.X+dx), float32(last.Y+dy), float32(point.X+dx), float32(point.Y+dy), 10.0, color.RGBA{256 * 3 / 16, 256 * 3 / 16, 256 * 3 / 16, 256 / 4}, true)
last = point
}