example/2048: Bug fix: Should update the tile when the tile stops

This commit is contained in:
Hajime Hoshi 2016-08-01 03:25:03 +09:00
parent 2c4b9c1dbe
commit 4e329f619f

View File

@ -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