mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-09 16:24:42 +00:00
40 lines
957 B
Haxe
40 lines
957 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');
|
|
}
|
|
|
|
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();
|
|
}
|
|
|
|
public function dance():Void
|
|
{
|
|
danceDir = !danceDir;
|
|
|
|
if (danceDir)
|
|
animation.play('danceRight', true);
|
|
else
|
|
animation.play('danceLeft', true);
|
|
}
|
|
}
|