1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-27 23:46:45 +00:00
Funkin/source/funkin/Boyfriend.hx

44 lines
832 B
Haxe

package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.util.FlxTimer;
using StringTools;
class Boyfriend extends Character
{
// public var stunned:Bool = false;
public function new(x:Float, y:Float, ?char:String = 'bf')
{
super(x, y, char, true);
}
public var startedDeath:Bool = false;
override function update(elapsed:Float)
{
if (!debugMode)
{
if (animation.curAnim.name.startsWith('sing'))
{
holdTimer += elapsed;
}
else
holdTimer = 0;
if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode)
{
playAnim('idle', true, false, 10);
}
if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished && startedDeath)
{
playAnim('deathLoop');
}
}
super.update(elapsed);
}
}