1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-27 17:33:03 +00:00
Funkin/source/Boyfriend.hx

44 lines
787 B
Haxe
Raw Normal View History

2020-10-04 18:50:12 +00:00
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
2020-11-11 03:09:48 +00:00
import flixel.util.FlxTimer;
2020-10-04 18:50:12 +00:00
2020-10-05 03:29:35 +00:00
using StringTools;
2020-10-04 22:27:49 +00:00
class Boyfriend extends Character
2020-10-04 18:50:12 +00:00
{
2020-10-05 03:29:35 +00:00
public var stunned:Bool = false;
2021-01-14 03:38:31 +00:00
public function new(x:Float, y:Float, ?char:String = 'bf')
2020-10-04 18:50:12 +00:00
{
2021-01-14 03:38:31 +00:00
super(x, y, char, true);
2020-10-04 21:44:52 +00:00
}
2020-10-05 03:29:35 +00:00
override function update(elapsed:Float)
{
2021-01-15 04:33:12 +00:00
if (!debugMode)
2020-11-11 03:09:48 +00:00
{
2021-01-15 04:33:12 +00:00
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)
{
playAnim('deathLoop');
}
2020-10-27 10:35:23 +00:00
}
2020-10-05 03:29:35 +00:00
super.update(elapsed);
}
2020-10-04 18:50:12 +00:00
}