Funkin/source/Boyfriend.hx

41 lines
714 B
Haxe
Raw Normal View History

2020-10-04 14:50:12 -04:00
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
2020-11-10 22:09:48 -05:00
import flixel.util.FlxTimer;
2020-10-04 14:50:12 -04:00
2020-10-04 23:29:35 -04:00
using StringTools;
2020-10-04 18:27:49 -04:00
class Boyfriend extends Character
2020-10-04 14:50:12 -04:00
{
2020-10-04 23:29:35 -04:00
public var stunned:Bool = false;
2020-10-04 14:50:12 -04:00
public function new(x:Float, y:Float)
{
super(x, y);
2020-10-04 17:44:52 -04:00
}
2020-10-04 23:29:35 -04:00
override function update(elapsed:Float)
{
2020-11-10 22:09:48 -05:00
if (animation.curAnim.name.startsWith('sing'))
{
holdTimer += elapsed;
}
else
holdTimer = 0;
2020-10-04 23:29:35 -04:00
if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode)
{
playAnim('idle', true, false, 10);
}
2020-10-27 06:35:23 -04:00
if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished)
{
playAnim('deathLoop');
}
2020-10-04 23:29:35 -04:00
super.update(elapsed);
}
2020-10-04 14:50:12 -04:00
}