fix DebugLayer camera disconnecting from pieceCamera
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
}
|
}
|
||||||
(set pieceCamera FlxG.camera))
|
(set pieceCamera FlxG.camera))
|
||||||
(set FlxG.camera pieceCamera)
|
(set FlxG.camera pieceCamera)
|
||||||
|
(when debugLayer
|
||||||
|
(set debugLayer.cameras [pieceCamera]))
|
||||||
(when uiCamera
|
(when uiCamera
|
||||||
(FlxG.cameras.remove uiCamera false)
|
(FlxG.cameras.remove uiCamera false)
|
||||||
(FlxG.cameras.add uiCamera)))
|
(FlxG.cameras.add uiCamera)))
|
||||||
@@ -57,7 +59,7 @@
|
|||||||
(#when debug
|
(#when debug
|
||||||
(debugLayer.clear)
|
(debugLayer.clear)
|
||||||
|
|
||||||
(when model.rewardFiles
|
(when (and model.rewardFiles rewardSprites.alive)
|
||||||
(doFor s rewardSprites
|
(doFor s rewardSprites
|
||||||
null
|
null
|
||||||
// Uncomment for debugging piece rotation:
|
// Uncomment for debugging piece rotation:
|
||||||
@@ -288,10 +290,11 @@
|
|||||||
(when !(= puzzleUnlocked -1)
|
(when !(= puzzleUnlocked -1)
|
||||||
(startPuzzlePackChoice puzzleUnlocked)))
|
(startPuzzlePackChoice puzzleUnlocked)))
|
||||||
|
|
||||||
|
(when debugLayer
|
||||||
|
(remove debugLayer))
|
||||||
(unless debugLayer
|
(unless debugLayer
|
||||||
(set debugLayer (new DebugLayer))
|
(set debugLayer (new DebugLayer))
|
||||||
(set debugLayer.cameras [pieceCamera]))
|
(set debugLayer.cameras [pieceCamera]))
|
||||||
(remove debugLayer)
|
|
||||||
(add debugLayer))
|
(add debugLayer))
|
||||||
|
|
||||||
(method refreshModel [&opt m]
|
(method refreshModel [&opt m]
|
||||||
|
Reference in New Issue
Block a user