game over
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE codename-engine-character>
|
||||
<character isPlayer="true" flipX="true" x="0" y="350">
|
||||
<anim name="firstDeath" anim="BF dies" fps="24" loop="false" x="37" y="11"/>
|
||||
<anim name="deathLoop" anim="BF Dead Loop" fps="24" loop="false" x="37" y="5"/>
|
||||
<anim name="deathConfirm" anim="BF Dead confirm" fps="24" loop="false" x="37" y="69"/>
|
||||
</character>
|
||||
@@ -4,6 +4,7 @@ import funkin.scripting.events.NoteHitEvent;
|
||||
public var pixelNotesForBF = true;
|
||||
public var pixelNotesForDad = true;
|
||||
public var enablePixelUI = true;
|
||||
public var enablePixelGameOver = true;
|
||||
public var enableCameraHacks = true;
|
||||
public var enablePauseMenu = true;
|
||||
public var isSpooky = false;
|
||||
@@ -91,6 +92,11 @@ function postCreate() {
|
||||
makeCameraPixely(camGame);
|
||||
defaultCamZoom /= daPixelZoom;
|
||||
}
|
||||
if (enablePixelGameOver) {
|
||||
gameOverSong = "pixel/gameOver";
|
||||
lossSFX = "pixel/gameOverSFX";
|
||||
retrySFX = "pixel/gameOverEnd";
|
||||
}
|
||||
}
|
||||
|
||||
function onStartCountdown() {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextureAtlas imagePath="spritesheet.png">
|
||||
<!-- Created with Adobe Animate version 21.0.1.37179 -->
|
||||
<!-- http://www.adobe.com/products/animate.html -->
|
||||
<SubTexture name="BF Dead Loop0000" x="0" y="0" width="439" height="435" pivotX="-35.7" pivotY="-998.7"/>
|
||||
<SubTexture name="BF Dead Loop0001" x="439" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0002" x="439" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0003" x="878" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0004" x="878" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0005" x="1317" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0006" x="1317" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0007" x="1756" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0008" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0009" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0010" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0011" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0012" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0013" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0014" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0015" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0016" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0017" x="0" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0018" x="439" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0019" x="439" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0020" x="878" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0021" x="878" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0022" x="1317" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0023" x="1317" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0024" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0025" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0026" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0027" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0028" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0029" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0030" x="1756" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0031" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0032" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead Loop0033" x="2195" y="0" width="439" height="435"/>
|
||||
<SubTexture name="BF Dead confirm0000" x="2634" y="0" width="439" height="435" pivotX="-35.7" pivotY="-934.9" frameX="0" frameY="-64" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0001" x="3073" y="0" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0002" x="3512" y="0" width="439" height="499"/>
|
||||
<SubTexture name="BF Dead confirm0003" x="0" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0004" x="439" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0005" x="878" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0006" x="1317" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0007" x="1756" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0008" x="2195" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0009" x="2634" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0010" x="3073" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0011" x="3512" y="499" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0012" x="0" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0013" x="439" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0014" x="878" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0015" x="1317" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0016" x="1756" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0017" x="2195" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0018" x="2634" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0019" x="3073" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0020" x="3512" y="968" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0021" x="0" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0022" x="439" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0023" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0024" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0025" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0026" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0027" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0028" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0029" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0030" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0031" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0032" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF Dead confirm0033" x="878" y="1437" width="439" height="469" frameX="0" frameY="-30" frameWidth="439" frameHeight="499"/>
|
||||
<SubTexture name="BF dies0000" x="1317" y="1437" width="433" height="415" pivotX="-35.7" pivotY="-992.05" frameX="-1" frameY="0" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0001" x="1750" y="1437" width="433" height="415" frameX="-1" frameY="0" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0002" x="2183" y="1437" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0003" x="2622" y="1437" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0004" x="3061" y="1437" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0005" x="3500" y="1437" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0006" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0007" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0008" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0009" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0010" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0011" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0012" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0013" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0014" x="0" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0015" x="439" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0016" x="439" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0017" x="439" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0018" x="878" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0019" x="878" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0020" x="1317" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0021" x="1317" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0022" x="1756" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0023" x="1756" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0024" x="2195" y="1906" width="439" height="412" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0025" x="2634" y="1906" width="439" height="439" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0026" x="2634" y="1906" width="439" height="439" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0027" x="3073" y="1906" width="439" height="434" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0028" x="3073" y="1906" width="439" height="434" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0029" x="3512" y="1906" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0030" x="3512" y="1906" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0031" x="0" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0032" x="0" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0033" x="0" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0034" x="0" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0035" x="439" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0036" x="878" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0037" x="1317" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0038" x="1756" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0039" x="2195" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0040" x="2634" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0041" x="3073" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0042" x="3512" y="2345" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0043" x="0" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0044" x="439" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0045" x="878" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0046" x="1317" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0047" x="1756" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0048" x="2195" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0049" x="2634" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0050" x="3073" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0051" x="3512" y="2780" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0052" x="0" y="3215" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0053" x="0" y="0" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="435"/>
|
||||
<SubTexture name="BF dies0054" x="439" y="3215" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0055" x="439" y="3215" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0056" x="439" y="3215" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
<SubTexture name="BF dies0057" x="439" y="3215" width="439" height="435" frameX="0" frameY="-6" frameWidth="439" frameHeight="445"/>
|
||||
</TextureAtlas>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
1384
|
||||
1391
|
||||
@@ -47,6 +47,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
|
||||
public var playerOffsets:Bool = false;
|
||||
|
||||
public var icon:String = null;
|
||||
public var gameOverCharacter:String = "bf-dead";
|
||||
|
||||
public var cameraOffset:FlxPoint = new FlxPoint(0, 0);
|
||||
public var globalOffset:FlxPoint = new FlxPoint(0, 0);
|
||||
@@ -111,6 +112,7 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
|
||||
if (xml.has.isGF) isGF = (xml.att.isGF == "true");
|
||||
if (xml.has.x) globalOffset.x = Std.parseFloat(xml.att.x);
|
||||
if (xml.has.y) globalOffset.y = Std.parseFloat(xml.att.y);
|
||||
if (xml.has.gameOverChar) gameOverCharacter = xml.att.gameOverChar;
|
||||
if (xml.has.camx) cameraOffset.x = Std.parseFloat(xml.att.camx);
|
||||
if (xml.has.camy) cameraOffset.y = Std.parseFloat(xml.att.camy);
|
||||
if (xml.has.holdTime) holdTime = CoolUtil.getDefault(Std.parseFloat(xml.att.holdTime), 4);
|
||||
@@ -142,56 +144,6 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
|
||||
/**
|
||||
NON CONVERTED CHARACTERS - DO NOT REMOVE
|
||||
**/
|
||||
// case 'gf-pixel':
|
||||
// tex = Paths.getSparrowAtlas('weeb/gfPixel');
|
||||
// frames = tex;
|
||||
// animation.addByIndices('singUP', 'GF IDLE', [2], "", 24, false);
|
||||
// animation.addByIndices('danceLeft', 'GF IDLE', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
|
||||
// animation.addByIndices('danceRight', 'GF IDLE', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
|
||||
|
||||
// addOffset('danceLeft', 0);
|
||||
// addOffset('danceRight', 0);
|
||||
|
||||
// playAnim('danceRight');
|
||||
|
||||
// setGraphicSize(Std.int(width * PlayState.daPixelZoom));
|
||||
// updateHitbox();
|
||||
// antialiasing = false;
|
||||
// flipX = true;
|
||||
|
||||
// case 'bf-pixel':
|
||||
// frames = Paths.getSparrowAtlas('weeb/bfPixel');
|
||||
// animation.addByPrefix('idle', 'BF IDLE', 24, false);
|
||||
// animation.addByPrefix('singUP', 'BF UP NOTE', 24, false);
|
||||
// animation.addByPrefix('singLEFT', 'BF LEFT NOTE', 24, false);
|
||||
// animation.addByPrefix('singRIGHT', 'BF RIGHT NOTE', 24, false);
|
||||
// animation.addByPrefix('singDOWN', 'BF DOWN NOTE', 24, false);
|
||||
// animation.addByPrefix('singUPmiss', 'BF UP MISS', 24, false);
|
||||
// animation.addByPrefix('singLEFTmiss', 'BF LEFT MISS', 24, false);
|
||||
// animation.addByPrefix('singRIGHTmiss', 'BF RIGHT MISS', 24, false);
|
||||
// animation.addByPrefix('singDOWNmiss', 'BF DOWN MISS', 24, false);
|
||||
|
||||
// addOffset('idle');
|
||||
// addOffset("singUP");
|
||||
// addOffset("singRIGHT");
|
||||
// addOffset("singLEFT");
|
||||
// addOffset("singDOWN");
|
||||
// addOffset("singUPmiss");
|
||||
// addOffset("singRIGHTmiss");
|
||||
// addOffset("singLEFTmiss");
|
||||
// addOffset("singDOWNmiss");
|
||||
|
||||
// setGraphicSize(Std.int(width * 6));
|
||||
// updateHitbox();
|
||||
|
||||
// playAnim('idle');
|
||||
|
||||
// width -= 100;
|
||||
// height -= 100;
|
||||
|
||||
// antialiasing = false;
|
||||
|
||||
// flipX = true;
|
||||
// case 'bf-pixel-dead':
|
||||
// frames = Paths.getSparrowAtlas('weeb/bfPixelsDEAD');
|
||||
// animation.addByPrefix('singUP', "BF Dies pixel", 24, false);
|
||||
@@ -210,67 +162,6 @@ class Character extends FlxSprite implements IBeatReceiver implements IOffsetCom
|
||||
// antialiasing = false;
|
||||
// flipX = true;
|
||||
|
||||
// case 'senpai':
|
||||
// frames = Paths.getSparrowAtlas('weeb/senpai');
|
||||
// animation.addByPrefix('idle', 'Senpai Idle', 24, false);
|
||||
// animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false);
|
||||
// animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false);
|
||||
// animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false);
|
||||
// animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false);
|
||||
|
||||
// addOffset('idle');
|
||||
// addOffset("singUP", 5, 37);
|
||||
// addOffset("singRIGHT");
|
||||
// addOffset("singLEFT", 40);
|
||||
// addOffset("singDOWN", 14);
|
||||
|
||||
// playAnim('idle');
|
||||
|
||||
// setGraphicSize(Std.int(width * 6));
|
||||
// updateHitbox();
|
||||
|
||||
// antialiasing = false;
|
||||
// case 'senpai-angry':
|
||||
// frames = Paths.getSparrowAtlas('weeb/senpai');
|
||||
// animation.addByPrefix('idle', 'Angry Senpai Idle', 24, false);
|
||||
// animation.addByPrefix('singUP', 'Angry Senpai UP NOTE', 24, false);
|
||||
// animation.addByPrefix('singLEFT', 'Angry Senpai LEFT NOTE', 24, false);
|
||||
// animation.addByPrefix('singRIGHT', 'Angry Senpai RIGHT NOTE', 24, false);
|
||||
// animation.addByPrefix('singDOWN', 'Angry Senpai DOWN NOTE', 24, false);
|
||||
|
||||
// addOffset('idle');
|
||||
// addOffset("singUP", 5, 37);
|
||||
// addOffset("singRIGHT");
|
||||
// addOffset("singLEFT", 40);
|
||||
// addOffset("singDOWN", 14);
|
||||
// playAnim('idle');
|
||||
|
||||
// setGraphicSize(Std.int(width * 6));
|
||||
// updateHitbox();
|
||||
|
||||
// antialiasing = false;
|
||||
|
||||
// case 'spirit':
|
||||
// frames = Paths.getPackerAtlas('weeb/spirit');
|
||||
// animation.addByPrefix('idle', "idle spirit_", 24, false);
|
||||
// animation.addByPrefix('singUP', "up_", 24, false);
|
||||
// animation.addByPrefix('singRIGHT', "right_", 24, false);
|
||||
// animation.addByPrefix('singLEFT', "left_", 24, false);
|
||||
// animation.addByPrefix('singDOWN', "spirit down_", 24, false);
|
||||
|
||||
// addOffset('idle', -220, -280);
|
||||
// addOffset('singUP', -220, -240);
|
||||
// addOffset("singRIGHT", -220, -280);
|
||||
// addOffset("singLEFT", -200, -280);
|
||||
// addOffset("singDOWN", 170, 110);
|
||||
|
||||
// setGraphicSize(Std.int(width * 6));
|
||||
// updateHitbox();
|
||||
|
||||
// playAnim('idle');
|
||||
|
||||
// antialiasing = false;
|
||||
|
||||
|
||||
isDanceLeftDanceRight = (animation.getByName("danceLeft") != null && animation.getByName("danceRight") != null);
|
||||
|
||||
|
||||
@@ -14,24 +14,26 @@ import funkin.system.Conductor;
|
||||
|
||||
class GameOverSubstate extends MusicBeatSubstate
|
||||
{
|
||||
var bf:Character;
|
||||
public var character:String;
|
||||
var character:Character;
|
||||
public var characterName:String;
|
||||
public var gameOverSong:String;
|
||||
public var lossSFXName:String;
|
||||
public var retrySFX:String;
|
||||
var camFollow:FlxObject;
|
||||
|
||||
var stageSuffix:String = "";
|
||||
|
||||
var x:Float = 0;
|
||||
var y:Float = 0;
|
||||
|
||||
public var lossSFX:FlxSound;
|
||||
|
||||
public function new(x:Float, y:Float, character:String = "bf", gameOverSong:String = "gameOver") {
|
||||
public function new(x:Float, y:Float, character:String = "bf-dead", gameOverSong:String = "gameOver", lossSFX:String = "gameOverSFX", retrySFX:String = "gameOverEnd") {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.character = character;
|
||||
this.characterName = character;
|
||||
this.gameOverSong = gameOverSong;
|
||||
this.lossSFXName = lossSFX;
|
||||
this.retrySFX = retrySFX;
|
||||
}
|
||||
|
||||
public override function create()
|
||||
@@ -40,18 +42,18 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
bf = new Character(x, y, character, true);
|
||||
add(bf);
|
||||
character = new Character(x, y, characterName, true);
|
||||
character.danceOnBeat = false;
|
||||
character.playAnim('firstDeath');
|
||||
add(character);
|
||||
|
||||
camFollow = new FlxObject(bf.getGraphicMidpoint().x, bf.getGraphicMidpoint().y, 1, 1);
|
||||
var camPos = character.getCameraPosition();
|
||||
camFollow = new FlxObject(camPos.x, camPos.y, 1, 1);
|
||||
add(camFollow);
|
||||
FlxG.camera.target = camFollow;
|
||||
|
||||
lossSFX = FlxG.sound.play(Paths.sound('fnf_loss_sfx' + stageSuffix));
|
||||
lossSFX = FlxG.sound.play(Paths.sound(lossSFXName));
|
||||
Conductor.changeBPM(100);
|
||||
|
||||
bf.danceOnBeat = false;
|
||||
bf.playAnim('firstDeath');
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
@@ -67,6 +69,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
{
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
FlxG.sound.music = null;
|
||||
|
||||
if (PlayState.isStoryMode)
|
||||
FlxG.switchState(new StoryMenuState());
|
||||
@@ -74,7 +77,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
FlxG.switchState(new FreeplayState());
|
||||
}
|
||||
|
||||
if (!lossSFX.playing && (FlxG.sound.music == null || !FlxG.sound.music.playing))
|
||||
if (!isEnding && ((!lossSFX.playing) || (character.animation.curAnim != null && character.animation.curAnim.name == "firstDeath" && character.animation.curAnim.finished)) && (FlxG.sound.music == null || !FlxG.sound.music.playing))
|
||||
CoolUtil.playMusic(Paths.music(gameOverSong), 100);
|
||||
}
|
||||
|
||||
@@ -82,7 +85,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
{
|
||||
super.beatHit(curBeat);
|
||||
if (!lossSFX.playing)
|
||||
bf.playAnim("deathLoop", DANCE);
|
||||
character.playAnim("deathLoop", true, DANCE);
|
||||
}
|
||||
|
||||
var isEnding:Bool = false;
|
||||
@@ -92,12 +95,22 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||
if (!isEnding)
|
||||
{
|
||||
isEnding = true;
|
||||
bf.playAnim('deathConfirm', true);
|
||||
character.playAnim('deathConfirm', true);
|
||||
FlxG.sound.music.stop();
|
||||
FlxG.sound.play(Paths.music('gameOverEnd' + stageSuffix));
|
||||
new FlxTimer().start(0.7, function(tmr:FlxTimer)
|
||||
var sound = FlxG.sound.play(Paths.sound(retrySFX));
|
||||
|
||||
var secsLength:Float = sound.length / 1000;
|
||||
var waitTime = 0.7;
|
||||
var fadeOutTime = secsLength - 0.7;
|
||||
|
||||
if (fadeOutTime < 0.5) {
|
||||
fadeOutTime = secsLength;
|
||||
waitTime = 0;
|
||||
}
|
||||
|
||||
new FlxTimer().start(waitTime, function(tmr:FlxTimer)
|
||||
{
|
||||
FlxG.camera.fade(FlxColor.BLACK, 2, false, function()
|
||||
FlxG.camera.fade(FlxColor.BLACK, fadeOutTime, false, function()
|
||||
{
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
FlxG.switchState(new PlayState());
|
||||
|
||||
@@ -80,7 +80,12 @@ class PlayState extends MusicBeatState
|
||||
public var scripts:ScriptPack;
|
||||
public var halloweenLevel:Bool = false;
|
||||
|
||||
public var gameOverSong:String = "gameOver";
|
||||
public var lossSFX:String = "fnf_loss_sfx";
|
||||
public var retrySFX:String = "gameOverEnd";
|
||||
|
||||
public var stage:Stage;
|
||||
public var canDie:Bool = true;
|
||||
public var scrollSpeed:Float = 0;
|
||||
public var downscroll(get, set):Bool;
|
||||
|
||||
@@ -782,6 +787,8 @@ class PlayState extends MusicBeatState
|
||||
super.closeSubState();
|
||||
}
|
||||
|
||||
var __wereVocalsPlaying:Bool = false;
|
||||
var __wasAutoPause:Bool = false;
|
||||
override public function onFocus():Void
|
||||
{
|
||||
scripts.call("onFocus");
|
||||
@@ -798,6 +805,8 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
#end
|
||||
if (__wasAutoPause && __wereVocalsPlaying)
|
||||
vocals.play();
|
||||
|
||||
super.onFocus();
|
||||
}
|
||||
@@ -811,6 +820,11 @@ class PlayState extends MusicBeatState
|
||||
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + difficultyText + ")", iconRPC);
|
||||
}
|
||||
#end
|
||||
if (__wasAutoPause = FlxG.autoPause) {
|
||||
__wereVocalsPlaying = vocals.playing;
|
||||
vocals.pause();
|
||||
}
|
||||
|
||||
|
||||
super.onFocusLost();
|
||||
}
|
||||
@@ -1003,31 +1017,8 @@ class PlayState extends MusicBeatState
|
||||
trace("User is cheating!");
|
||||
}
|
||||
|
||||
if (health <= 0)
|
||||
{
|
||||
boyfriend.stunned = true;
|
||||
|
||||
persistentUpdate = false;
|
||||
persistentDraw = false;
|
||||
paused = true;
|
||||
|
||||
vocals.stop();
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
openSubState(new GameOverSubstate(boyfriend.x, boyfriend.y));
|
||||
|
||||
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||
|
||||
#if desktop
|
||||
// Game Over doesn't get his own variable because it's only used here
|
||||
DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + difficultyText + ")", iconRPC);
|
||||
#end
|
||||
}
|
||||
|
||||
// while(unspawnNotes[0] != null && unspawnNotes[0].strumTime - Conductor.songPosition < 1500)
|
||||
// notes.add(unspawnNotes.shift());
|
||||
|
||||
|
||||
if (health <= 0 && canDie)
|
||||
gameOver();
|
||||
|
||||
if (generatedMusic)
|
||||
{
|
||||
@@ -1091,6 +1082,30 @@ class PlayState extends MusicBeatState
|
||||
scripts.call("postUpdate", [elapsed]);
|
||||
}
|
||||
|
||||
function gameOver(?character:String, ?gameOverSong:String, ?lossSFX:String, ?retrySFX:String) {
|
||||
character = character.getDefault((boyfriend != null) ? boyfriend.gameOverCharacter : "bf-dead");
|
||||
gameOverSong.getDefault(this.gameOverSong);
|
||||
lossSFX.getDefault(this.lossSFX);
|
||||
retrySFX.getDefault(this.retrySFX);
|
||||
|
||||
boyfriend.stunned = true;
|
||||
|
||||
persistentUpdate = false;
|
||||
persistentDraw = false;
|
||||
paused = true;
|
||||
|
||||
vocals.stop();
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
openSubState(new GameOverSubstate(boyfriend.x, boyfriend.y, character, gameOverSong, lossSFX, retrySFX));
|
||||
|
||||
#if desktop
|
||||
// Game Over doesn't get his own variable because it's only used here
|
||||
DiscordClient.changePresence("Game Over - " + detailsText, SONG.song + " (" + difficultyText + ")", iconRPC);
|
||||
#end
|
||||
}
|
||||
|
||||
function endSong():Void
|
||||
{
|
||||
scripts.call("onSongEnd");
|
||||
|
||||
Reference in New Issue
Block a user