diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-25 11:49:42 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-25 11:49:42 +0200 |
| commit | 87563d8bbf70cba9443435113a8bddfcd39f611d (patch) | |
| tree | d0d98265f0552791e6459af99366f3658502788d /main.go | |
| parent | 563b9ee704a14322ed4805896c4f8ca3fa5df03a (diff) | |
refactor: ECS patrol order
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -103,7 +103,9 @@ func (g *Game) updatePatrolling(cursor physics.Point) { if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonRight) { destination := cursor.Div(100).Mul(100) for _, e := range g.Entities { - Patrol(e, destination) + if e.Selection.IsEnabled && e.Selection.Value.IsSelected { + Patrol(e.Position, e.Move, &e.Order, destination) + } } g.CurrentAction = Selecting } |
