1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-09 00:04:42 +00:00
Funkin/source/Boyfriend.hx

46 lines
846 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
{
// public var stunned:Bool = false;
2020-10-05 03:29:35 +00:00
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
2021-03-18 18:15:54 +00:00
public var startedDeath:Bool = false;
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);
}
2021-03-18 18:15:54 +00:00
if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished && startedDeath)
2021-01-15 04:33:12 +00:00
{
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
}