File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,15 @@ class ModSwitchMenu extends MusicBeatSubstate {
11
11
var alphabets : FlxTypedGroup <Alphabet >;
12
12
var curSelected : Int = 0 ;
13
13
14
+ var subCam : FlxCamera ;
15
+
14
16
public override function create () {
15
17
super .create ();
16
18
19
+ camera = subCam = new FlxCamera ();
20
+ subCam .bgColor = 0 ;
21
+ FlxG .cameras .add (subCam , false );
22
+
17
23
var bg = new FlxSprite (0 , 0 ).makeSolid (FlxG .width , FlxG .height , 0xFF000000 );
18
24
bg .updateHitbox ();
19
25
bg .scrollFactor .set ();
@@ -63,5 +69,12 @@ class ModSwitchMenu extends MusicBeatSubstate {
63
69
}
64
70
alphabets .members [curSelected ].alpha = 1 ;
65
71
}
72
+
73
+ override function destroy () {
74
+ super .destroy ();
75
+
76
+ if (FlxG .cameras .list .contains (subCam ))
77
+ FlxG .cameras .remove (subCam );
78
+ }
66
79
}
67
80
#end
You can’t perform that action at this time.
0 commit comments