1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-09-11 20:57:20 +00:00

death alt easter egg

This commit is contained in:
Cameron Taylor 2023-05-31 03:03:10 -04:00
parent 4efafe8a78
commit dbab5a912d
2 changed files with 18 additions and 2 deletions

View file

@ -16,7 +16,7 @@ class FlxAtlasSprite extends FlxAnimate
FrameRate: 24.0,
Reversed: false,
// ?OnComplete:Void -> Void,
ShowPivot: #if debug true #else false #end,
ShowPivot: #if debug false #else false #end,
Antialiasing: true,
ScrollFactor: new FlxPoint(1, 1),
// Offset: new FlxPoint(0, 0), // This is just FlxSprite.offset

View file

@ -1,5 +1,7 @@
package funkin.play;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.system.FlxSound;
@ -97,7 +99,21 @@ class GameOverSubstate extends MusicBeatSubstate
boyfriend.isDead = true;
add(boyfriend);
boyfriend.resetCharacter();
boyfriend.playAnimation('firstDeath', true, true);
if (animationSuffix == "" && FlxG.random.bool((1 / 4000) * 100))
{
var bfFake:FlxAtlasSprite = new FlxAtlasSprite(boyfriend.x - 440, boyfriend.y - 240, Paths.animateAtlas("characters/bfFakeOut", "shared"),);
add(bfFake);
bfFake.playAnimation("");
bfFake.anim.onComplete = () -> {
bfFake.visible = false;
boyfriend.visible = true;
boyfriend.playAnimation('firstDeath', true, true);
};
boyfriend.visible = false;
}
else
boyfriend.playAnimation('firstDeath', true, true);
// Assign a camera follow point to the boyfriend's position.
cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1);