File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
source/states/freeplay/osu Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,39 @@ class DiffBox extends SongBox
1717 public var difID : Int = 0 ;
1818 public var difName : String = ' ' ;
1919}
20+
21+
22+ class SongGroup extends FlxTypedGroup <SongBox >
23+ {
24+ public var songBox : SongBox ;
25+ public var diffBoxes : Array <DiffBox >;
26+
27+ public function new (songBox : SongBox , diffNames : Array <String >)
28+ {
29+ super ();
30+ this .songBox = songBox ;
31+ this .diffBoxes = [];
32+
33+ add (songBox );
34+
35+ for (i in 0 ... diffNames .length )
36+ {
37+ var diffBox = new DiffBox ();
38+ diffBox .difID = i ;
39+ diffBox .difName = diffNames [i ];
40+ diffBox .posY = i + 1 ; // Position below the SongBox
41+ diffBox .songID = songBox .songID ;
42+ diffBoxes .push (diffBox );
43+ add (diffBox );
44+ }
45+ }
46+
47+ override public function update (elapsed : Float ): Void
48+ {
49+ super .update (elapsed );
50+ for (diffBox in diffBoxes )
51+ {
52+ diffBox .posY = diffBoxes .indexOf (diffBox ) + 1 ;
53+ }
54+ }
55+ }
You can’t perform that action at this time.
0 commit comments