mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
example/2048: Bug fix: Should update the tile when the tile stops
This commit is contained in:
parent
2c4b9c1dbe
commit
4e329f619f
@ -71,6 +71,10 @@ func (t *Tile) IsMoving() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tile) stopAnimation() {
|
func (t *Tile) stopAnimation() {
|
||||||
|
if 0 < t.movingCount {
|
||||||
|
t.current = t.next
|
||||||
|
t.next = TileData{}
|
||||||
|
}
|
||||||
t.movingCount = 0
|
t.movingCount = 0
|
||||||
t.startPoppingCount = 0
|
t.startPoppingCount = 0
|
||||||
t.poppingCount = 0
|
t.poppingCount = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user