fix tempcamera handling on scene switch
This commit is contained in:
@@ -301,13 +301,26 @@
|
||||
(flxMovie.setCameras skySprite [camera])
|
||||
(.add (first spriteLayers.members) skySprite)
|
||||
|
||||
(FlxG.cameras.remove flxMovie.uiCamera false)
|
||||
(FlxG.cameras.remove flxMovie.screenCamera false)
|
||||
// Remove cameras top to bottom:
|
||||
(FlxG.cameras.remove flxMovie.spriteChangeDebugCamera false)
|
||||
(FlxG.cameras.remove flxMovie.uiCamera false)
|
||||
(doFor camera flxMovie.tempCamerasOrder
|
||||
(FlxG.cameras.remove camera false))
|
||||
(FlxG.cameras.remove flxMovie.screenCamera false)
|
||||
(doFor camera flxMovie.tempBgCamerasOrder
|
||||
(FlxG.cameras.remove camera false))
|
||||
|
||||
// Add cameras bottom to top
|
||||
(doFor camera flxMovie.tempBgCamerasOrder
|
||||
(FlxG.cameras.add camera (dictGet flxMovie.tempBgCameras camera)))
|
||||
(FlxG.cameras.add camera false)
|
||||
(FlxG.cameras.add flxMovie.screenCamera false)
|
||||
(doFor camera flxMovie.tempCamerasOrder
|
||||
(FlxG.cameras.add camera (dictGet flxMovie.tempCameras camera)))
|
||||
(FlxG.cameras.add flxMovie.uiCamera false)
|
||||
(FlxG.cameras.add flxMovie.spriteChangeDebugCamera false)
|
||||
|
||||
// Add the set
|
||||
(flxMovie.setCameras setSprite [camera])
|
||||
(.add (first spriteLayers.members) setSprite)
|
||||
(cc))
|
||||
|
@@ -32,10 +32,10 @@ class FlxMovie extends Movie<FlxSprite, ActorFlxSprite, FlxSound, FlxSound, FlxS
|
||||
public var screenCamera:FlxCamera;
|
||||
public var spriteChangeDebugCamera:FlxCamera;
|
||||
|
||||
var tempCamerasOrder:Array<FlxCamera> = [];
|
||||
var tempCameras:Map<FlxCamera,Bool> = [];
|
||||
var tempBgCamerasOrder:Array<FlxCamera> = [];
|
||||
var tempBgCameras:Map<FlxCamera,Bool> = [];
|
||||
public var tempCamerasOrder:Array<FlxCamera> = [];
|
||||
public var tempCameras:Map<FlxCamera,Bool> = [];
|
||||
public var tempBgCamerasOrder:Array<FlxCamera> = [];
|
||||
public var tempBgCameras:Map<FlxCamera,Bool> = [];
|
||||
|
||||
public var nextFrameActions:Array<Void->Void> = [];
|
||||
|
||||
|
Reference in New Issue
Block a user