@@ -2,7 +2,7 @@ package funkin.game;
22
33import haxe .xml .Access ;
44
5- class SplashGroup extends FlxTypedGroup <FunkinSprite > {
5+ class SplashGroup extends FlxTypedGroup <Splash > {
66 /**
77 * Whenever the splash group has successfully loaded or not.
88 */
@@ -46,7 +46,7 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
4646 }
4747
4848 function createSplash (imagePath : String ) {
49- var splash = new FunkinSprite ();
49+ var splash = new Splash ();
5050 splash .antialiasing = true ;
5151 splash .active = splash .visible = false ;
5252 splash .loadSprite (Paths .image (imagePath ));
@@ -56,7 +56,7 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
5656 return splash ;
5757 }
5858
59- function setupAnims (xml : Access , splash : FunkinSprite ) {
59+ function setupAnims (xml : Access , splash : Splash ) {
6060 for (strum in xml .nodes .strum ) {
6161 var id : Null <Int > = Std .parseInt (strum .att .id );
6262 if (id != null ) {
@@ -85,12 +85,14 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
8585 };
8686 }
8787
88- function pregenerateSplashes (splash : FunkinSprite ) {
88+ function pregenerateSplashes (splash : Splash ) {
8989 // make 7 additional splashes
9090 for (i in 0 ... 7 ) {
91- var spr = FunkinSprite .copyFrom (splash );
91+ var spr = Splash .copyFrom (splash );
9292 spr .animation .finishCallback = function (name : String ) {
9393 spr .active = spr .visible = false ;
94+ spr .strum = null ;
95+ spr .strumID = null ;
9496 };
9597 add (spr );
9698 }
@@ -103,11 +105,14 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
103105 return animationNames [id ][FlxG .random .int (0 , animationNames [id ].length - 1 )];
104106 }
105107
106- var __splash : FunkinSprite ;
108+ var __splash : Splash ;
107109 public function showOnStrum (strum : Strum ) {
108110 if (! valid ) return null ;
109111 __splash = recycle ();
110112
113+ __splash .strum = strum ;
114+ __splash .strumID = strum. ID ;
115+
111116 __splash .cameras = strum .lastDrawCameras ;
112117 __splash .setPosition (strum .x + ((strum .width - __splash .width ) / 2 ), strum .y + ((strum .height - __splash .height ) / 2 ));
113118 __splash .active = __splash .visible = true ;
0 commit comments