1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-25 08:13:45 +00:00
Funkin/source/BackgroundGirls.hx
MtH 7e52a76329 quickAnimAdd() for all, fixes looping anims
dad, pico looping idle fixed, they now dance on beat instead
also adds animation.finish() after initial anims, so their anims on create don't get in the way of anims during countdown
commented-out idea for senpai idle, as it's currently 2 beats long but not properly on beat
2021-03-19 18:13:41 +01:00

42 lines
1,001 B
Haxe

package;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
class BackgroundGirls extends FlxSprite
{
public function new(x:Float, y:Float)
{
super(x, y);
// BG fangirls dissuaded
frames = Paths.getSparrowAtlas('weeb/bgFreaks');
animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false);
animation.play('danceLeft');
animation.finish();
}
var danceDir:Bool = false;
public function getScared():Void
{
animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false);
dance();
animation.finish();
}
public function dance():Void
{
danceDir = !danceDir;
if (danceDir)
animation.play('danceRight', true);
else
animation.play('danceLeft', true);
}
}