higher lvel balls move first in their phase
This commit is contained in:
parent
3aae6dd56e
commit
a119a6bd65
1 changed files with 1 additions and 1 deletions
2
board.gd
2
board.gd
|
|
@ -95,7 +95,7 @@ func do_step():
|
||||||
var pieces_diagonal := pieces_moving.filter(func(piece): return piece.lvel.x != 0 and piece.lvel.y != 0)
|
var pieces_diagonal := pieces_moving.filter(func(piece): return piece.lvel.x != 0 and piece.lvel.y != 0)
|
||||||
|
|
||||||
var magnitude_sort := func(a: Piece, b: Piece):
|
var magnitude_sort := func(a: Piece, b: Piece):
|
||||||
return a.lvel.length() < b.lvel.length()
|
return a.lvel.length() > b.lvel.length()
|
||||||
|
|
||||||
pieces_cardinal.sort_custom(magnitude_sort)
|
pieces_cardinal.sort_custom(magnitude_sort)
|
||||||
pieces_diagonal.sort_custom(magnitude_sort)
|
pieces_diagonal.sort_custom(magnitude_sort)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue