We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00c7668 commit 8de3705Copy full SHA for 8de3705
flixel/system/frontEnds/CameraFrontEnd.hx
@@ -57,22 +57,19 @@ class CameraFrontEnd
57
*/
58
public function remove(Camera:FlxCamera, Destroy:Bool = true):Void
59
{
60
- #if !js
61
- if ((Camera != null) && FlxG.game.contains(Camera.flashSprite))
+ var index:Int = list.indexOf(Camera);
+ if ((Camera != null) && index != -1)
62
63
+ #if !js
64
FlxG.game.removeChild(Camera.flashSprite);
- var index = FlxArrayUtil.indexOf(FlxG.cameras.list, Camera);
65
+ #end
66
- if (index >= 0)
67
- {
68
- FlxG.cameras.list.splice(index, 1);
69
- }
+ list.splice(index, 1);
70
}
71
else
72
73
FlxG.log.warn("FlxG.cameras.remove(): The camera you attemped to remove is not a part of the game.");
74
75
- #end
76
77
#if FLX_RENDER_TILE
78
for (i in 0...list.length)
0 commit comments