refactor: group launched/in_space state
This commit is contained in:
@@ -42,8 +42,9 @@ func (c *Cache) moveShipGroup(i int, delta float64) {
|
||||
var x, y float64
|
||||
x, y, arrived =
|
||||
util.NextTravelCoord(c.g.Map.Width, c.g.Map.Height, originX, originY, destPlanet.X.F(), destPlanet.Y.F(), delta)
|
||||
sg.StateInSpace.X = game.F(x)
|
||||
sg.StateInSpace.Y = game.F(y)
|
||||
fx, fy := game.F(x), game.F(y)
|
||||
sg.StateInSpace.X = &fx
|
||||
sg.StateInSpace.Y = &fy
|
||||
if arrived {
|
||||
sg.StateInSpace = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user