Funkin/source/BackgroundGirls.hx

40 lines
957 B
Haxe
Raw Normal View History

2021-01-25 05:04:31 -05:00
package;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
class BackgroundGirls extends FlxSprite
{
public function new(x:Float, y:Float)
{
super(x, y);
2021-02-02 03:24:34 -05:00
// BG fangirls dissuaded
2021-02-08 16:34:48 -05:00
frames = Paths.getSparrowAtlas('weeb/bgFreaks');
2021-02-02 03:24:34 -05:00
2021-01-25 05:04:31 -05:00
animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false);
2021-02-02 03:24:34 -05:00
2021-01-25 05:04:31 -05:00
animation.play('danceLeft');
}
var danceDir:Bool = false;
2021-02-02 03:24:34 -05:00
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();
}
2021-01-25 05:04:31 -05:00
public function dance():Void
{
danceDir = !danceDir;
if (danceDir)
animation.play('danceRight', true);
else
animation.play('danceLeft', true);
}
}