notesplash anim fixes (fidy!!!!)
This commit is contained in:
@@ -103,15 +103,17 @@ class SplashGroup extends FlxTypedGroup<FunkinSprite> {
|
||||
return animationNames[id][FlxG.random.int(0, animationNames[id].length-1)];
|
||||
}
|
||||
|
||||
var __splash:FunkinSprite;
|
||||
public function showOnStrum(strum:Strum) {
|
||||
if (!valid) return null;
|
||||
var splash = recycle();
|
||||
__splash = recycle();
|
||||
|
||||
splash.cameras = strum.lastDrawCameras;
|
||||
splash.setPosition(strum.x + ((strum.width - splash.width) / 2), strum.y + ((strum.height - splash.height) / 2));
|
||||
splash.active = splash.visible = true;
|
||||
splash.playAnim(getSplashAnim(strum.ID), true);
|
||||
__splash.cameras = strum.lastDrawCameras;
|
||||
__splash.setPosition(strum.x + ((strum.width - __splash.width) / 2), strum.y + ((strum.height - __splash.height) / 2));
|
||||
__splash.active = __splash.visible = true;
|
||||
__splash.playAnim(getSplashAnim(strum.ID), true);
|
||||
__splash.scrollFactor.set(strum.scrollFactor.x, strum.scrollFactor.y);
|
||||
|
||||
return splash;
|
||||
return __splash;
|
||||
}
|
||||
}
|
||||
@@ -31,9 +31,10 @@ class SplashHandler extends FlxTypedGroup<FunkinSprite> {
|
||||
grpMap = null;
|
||||
}
|
||||
|
||||
var __grp:SplashGroup;
|
||||
public function showSplash(name:String, strum:Strum) {
|
||||
var grp = getSplashGroup(name);
|
||||
add(grp.showOnStrum(strum));
|
||||
__grp = getSplashGroup(name);
|
||||
add(__grp.showOnStrum(strum));
|
||||
|
||||
// max 8 rendered splashes
|
||||
while(members.length > 8)
|
||||
|
||||
@@ -43,13 +43,18 @@ class FunkinSprite extends FlxSprite implements IBeatReceiver implements IOffset
|
||||
|
||||
public static function copyFrom(source:FunkinSprite) {
|
||||
var spr = new FunkinSprite();
|
||||
spr.setPosition(source.x, source.y);
|
||||
spr.frames = source.frames;
|
||||
if (source.animateAtlas != null && source.atlasPath != null)
|
||||
spr.loadSprite(source.atlasPath);
|
||||
spr.animation.copyFrom(source.animation);
|
||||
spr.visible = source.visible;
|
||||
spr.alpha = source.alpha;
|
||||
@:privateAccess {
|
||||
spr.setPosition(source.x, source.y);
|
||||
spr.frames = source.frames;
|
||||
if (source.animateAtlas != null && source.atlasPath != null)
|
||||
spr.loadSprite(source.atlasPath);
|
||||
spr.animation.copyFrom(source.animation);
|
||||
spr.visible = source.visible;
|
||||
spr.alpha = source.alpha;
|
||||
spr.antialiasing = source.antialiasing;
|
||||
spr.scale.set(source.scale.x, source.scale.y);
|
||||
spr.scrollFactor.set(source.scrollFactor.x, source.scrollFactor.y);
|
||||
}
|
||||
return spr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user