fix match detection
This commit is contained in:
@@ -272,13 +272,13 @@
|
|||||||
(new FlxSprite 0 0
|
(new FlxSprite 0 0
|
||||||
(BitmapData.fromFile
|
(BitmapData.fromFile
|
||||||
currentRewardFile.path)))
|
currentRewardFile.path)))
|
||||||
|
|
||||||
(set matchingPiecesLeft (new Map))
|
(set matchingPiecesLeft (new Map))
|
||||||
(set matchingPiecesRight (new Map))
|
(set matchingPiecesRight (new Map))
|
||||||
(set matchingPiecesUp (new Map))
|
(set matchingPiecesUp (new Map))
|
||||||
(set matchingPiecesDown (new Map))
|
(set matchingPiecesDown (new Map))
|
||||||
(set pieceData (new Map))
|
(set pieceData (new Map))
|
||||||
(set connectedPieces (new Map))
|
(set connectedPieces (new Map))
|
||||||
|
(doFor i (range TOTAL_PIECES) (dictSet connectedPieces i []))
|
||||||
(set indexMap (new Map))
|
(set indexMap (new Map))
|
||||||
(set spriteMap (new Map))
|
(set spriteMap (new Map))
|
||||||
|
|
||||||
@@ -305,12 +305,6 @@
|
|||||||
// add rewardSprites group before enabling drag-to-select on instances
|
// add rewardSprites group before enabling drag-to-select on instances
|
||||||
(add rewardSprites))
|
(add rewardSprites))
|
||||||
|
|
||||||
(doFor map [matchingPiecesLeft matchingPiecesRight matchingPiecesUp matchingPiecesDown]
|
|
||||||
(map.clear))
|
|
||||||
(connectedPieces.clear)
|
|
||||||
(doFor i (range TOTAL_PIECES) (dictSet connectedPieces i []))
|
|
||||||
(indexMap.clear)
|
|
||||||
|
|
||||||
(let [r (new FlxRandom (Strings.hashCode currentRewardFile.path))
|
(let [r (new FlxRandom (Strings.hashCode currentRewardFile.path))
|
||||||
ros (roughOptimalScale)
|
ros (roughOptimalScale)
|
||||||
graphicWidth (* ros rewardSprite.pixels.width)
|
graphicWidth (* ros rewardSprite.pixels.width)
|
||||||
|
|||||||
Reference in New Issue
Block a user