This commit is contained in:
Kade M 2021-07-11 23:26:26 -07:00
commit 26c74b6fc1
8 changed files with 68 additions and 33 deletions

View File

@ -224,7 +224,7 @@ class Character extends FlxSprite
animation.addByPrefix('hey', 'BF HEY', 24, false); animation.addByPrefix('hey', 'BF HEY', 24, false);
animation.addByPrefix('firstDeath', "BF dies", 24, false); animation.addByPrefix('firstDeath', "BF dies", 24, false);
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true); animation.addByPrefix('deathLoop', "BF Dead Loop", 24, false);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
animation.addByPrefix('scared', 'BF idle shaking', 24); animation.addByPrefix('scared', 'BF idle shaking', 24);
@ -300,7 +300,7 @@ class Character extends FlxSprite
frames = Paths.getSparrowAtlas('bfPixelsDEAD','shared',true); frames = Paths.getSparrowAtlas('bfPixelsDEAD','shared',true);
animation.addByPrefix('singUP', "BF Dies pixel", 24, false); animation.addByPrefix('singUP', "BF Dies pixel", 24, false);
animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false);
animation.addByPrefix('deathLoop', "Retry Loop", 24, true); animation.addByPrefix('deathLoop', "Retry Loop", 24, false);
animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false);
animation.play('firstDeath'); animation.play('firstDeath');

View File

@ -48,6 +48,8 @@ class GameOverSubstate extends MusicBeatSubstate
bf.playAnim('firstDeath'); bf.playAnim('firstDeath');
} }
var startVibin:Bool = false;
override function update(elapsed:Float) override function update(elapsed:Float)
{ {
super.update(elapsed); super.update(elapsed);
@ -76,6 +78,7 @@ class GameOverSubstate extends MusicBeatSubstate
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished) if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.finished)
{ {
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix)); FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix));
startVibin = true;
} }
if (FlxG.sound.music.playing) if (FlxG.sound.music.playing)
@ -88,6 +91,10 @@ class GameOverSubstate extends MusicBeatSubstate
{ {
super.beatHit(); super.beatHit();
if (startVibin && !isEnding)
{
bf.playAnim('deathLoop', true);
}
FlxG.log.add('beat'); FlxG.log.add('beat');
} }

View File

@ -86,13 +86,6 @@ class Main extends Sprite
#end #end
addChild(game); addChild(game);
#if !mobile
fpsCounter = new FPS(10, 3, 0xFFFFFF);
addChild(fpsCounter);
toggleFPS(FlxG.save.data.fps);
#end
PlayerSettings.init(); PlayerSettings.init();
#if windows #if windows
@ -110,6 +103,12 @@ class Main extends Sprite
FlxG.save.bind('funkin', 'ninjamuffin99'); FlxG.save.bind('funkin', 'ninjamuffin99');
KadeEngineData.initSave(); KadeEngineData.initSave();
#if !mobile
fpsCounter = new FPS(10, 3, 0xFFFFFF);
addChild(fpsCounter);
toggleFPS(FlxG.save.data.fps);
#end
} }
var game:FlxGame; var game:FlxGame;

View File

@ -53,7 +53,9 @@ class MusicBeatState extends FlxUIState
//everyStep(); //everyStep();
var nextStep:Int = updateCurStep(); var nextStep:Int = updateCurStep();
if (nextStep > curStep && curStep >= 0) if (nextStep >= 0)
{
if (nextStep > curStep)
{ {
for (i in curStep...nextStep) for (i in curStep...nextStep)
{ {
@ -62,6 +64,14 @@ class MusicBeatState extends FlxUIState
stepHit(); stepHit();
} }
} }
else if (nextStep < curStep)
{
//Song reset?
curStep = nextStep;
updateBeat();
stepHit();
}
}
if (FlxG.save.data.fpsRain && skippedFrames >= 6) if (FlxG.save.data.fpsRain && skippedFrames >= 6)
{ {

View File

@ -26,7 +26,9 @@ class MusicBeatSubstate extends FlxSubState
//everyStep(); //everyStep();
var nextStep = updateCurStep(); var nextStep = updateCurStep();
if (nextStep > curStep && curStep >= 0) if (nextStep >= 0)
{
if (nextStep > curStep)
{ {
for (i in curStep...nextStep) for (i in curStep...nextStep)
{ {
@ -35,6 +37,14 @@ class MusicBeatSubstate extends FlxSubState
stepHit(); stepHit();
} }
} }
else if (nextStep < curStep)
{
//Song reset?
curStep = nextStep;
updateBeat();
stepHit();
}
}
super.update(elapsed); super.update(elapsed);
} }

View File

@ -35,6 +35,8 @@ class Note extends FlxSprite
public var noteScore:Float = 1; public var noteScore:Float = 1;
public var noteYOff:Int = 0;
public static var swagWidth:Float = 160 * 0.7; public static var swagWidth:Float = 160 * 0.7;
public static var PURP_NOTE:Int = 0; public static var PURP_NOTE:Int = 0;
public static var GREEN_NOTE:Int = 2; public static var GREEN_NOTE:Int = 2;
@ -92,8 +94,6 @@ class Note extends FlxSprite
//defaults if no noteStyle was found in chart //defaults if no noteStyle was found in chart
var noteTypeCheck:String = 'normal'; var noteTypeCheck:String = 'normal';
if (PlayState.curStage.startsWith('school'))
noteTypeCheck = 'pixel';
if (inCharter) if (inCharter)
{ {
@ -192,22 +192,29 @@ class Note extends FlxSprite
x -= width / 2; x -= width / 2;
if (noteTypeCheck == 'pixel') //if (noteTypeCheck == 'pixel')
x += 30; // x += 30;
if (inCharter) if (inCharter)
x += 30; x += 30;
if (prevNote.isSustainNote) if (prevNote.isSustainNote)
{ {
prevNote.animation.play(dataColor[prevNote.originColor] + 'hold'); prevNote.animation.play(dataColor[prevNote.originColor] + 'hold');
if(FlxG.save.data.scrollSpeed != 1)
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.scrollSpeed;
else
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox(); prevNote.updateHitbox();
prevNote.noteYOff = 0;
prevNote.scale.y *= (0.45 * Conductor.stepCrochet * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? PlayState.SONG.speed : PlayStateChangeables.scrollSpeed, 2)) / prevNote.height * 1.01; //The 1.01 is so that there aren't odd 1 pixel gaps as the notes scroll
prevNote.updateHitbox();
// prevNote.setGraphicSize(); // prevNote.setGraphicSize();
switch (noteTypeCheck)
{
case 'pixel':
noteYOff = -13;
default:
noteYOff = -23;
}
} }
} }
} }

View File

@ -2641,6 +2641,8 @@ class PlayState extends MusicBeatState
if (generatedMusic) if (generatedMusic)
{ {
var holdArray:Array<Bool> = [controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT];
notes.forEachAlive(function(daNote:Note) notes.forEachAlive(function(daNote:Note)
{ {
// instead of doing stupid y > FlxG.height // instead of doing stupid y > FlxG.height
@ -2662,14 +2664,12 @@ class PlayState extends MusicBeatState
{ {
if (daNote.mustPress) if (daNote.mustPress)
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
+ + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed, 2)) - daNote.noteYOff;
2));
else else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
+ + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed, 2)) - daNote.noteYOff;
2));
if (daNote.isSustainNote) if (daNote.isSustainNote)
{ {
// Remember = minus makes notes go up, plus makes them go down // Remember = minus makes notes go up, plus makes them go down
@ -2711,11 +2711,11 @@ class PlayState extends MusicBeatState
if (daNote.mustPress) if (daNote.mustPress)
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
- 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed, - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2)); 2)) + daNote.noteYOff;
else else
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
- 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed, - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
2)); 2)) + daNote.noteYOff;
if (daNote.isSustainNote) if (daNote.isSustainNote)
{ {
daNote.y -= daNote.height / 2; daNote.y -= daNote.height / 2;

View File

@ -364,6 +364,8 @@ class TitleState extends MusicBeatState
switch (curBeat) switch (curBeat)
{ {
case 0:
deleteCoolText();
case 1: case 1:
createCoolText(['ninjamuffin99', 'phantomArcade', 'kawaisprite', 'evilsk8er']); createCoolText(['ninjamuffin99', 'phantomArcade', 'kawaisprite', 'evilsk8er']);
// credTextShit.visible = true; // credTextShit.visible = true;