1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-23 15:26:06 +00:00

charts an shit and death counter

This commit is contained in:
Cameron Taylor 2021-03-04 14:30:35 -05:00
parent 6d002a8ef8
commit 0951b672e7
3 changed files with 58 additions and 36 deletions

View file

@ -497,15 +497,29 @@ class Character extends FlxSprite
playAnim('idle');
case 'tankman':
frames = Paths.getSparrowAtlas('characters/tankmanCaptain');
animation.addByPrefix('idle', "Tankman Idle Dance", 24, false);
if (isPlayer)
{
animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false);
animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false);
animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false);
}
else
{
// Need to be flipped! REDO THIS LATER
animation.addByPrefix('singLEFT', 'Tankman Right Note0', 24, false);
animation.addByPrefix('singRIGHT', 'Tankman Note Left0', 24, false);
animation.addByPrefix('singLEFTmiss', 'Tankman Right Note MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'Tankman Note Left MISS', 24, false);
}
animation.addByPrefix('singUP', 'Tankman UP note0', 24, false);
animation.addByPrefix('singDOWN', 'Tankman DOWN note0', 24, false);
animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false);
animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false);
animation.addByPrefix('singUPmiss', 'Tankman UP note MISS', 24, false);
animation.addByPrefix('singDOWNmiss', 'Tankman DOWN note MISS', 24, false);
animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false);
addOffset('idle');
addOffset("singUP", 24, 56);

View file

@ -51,15 +51,25 @@ class PauseSubState extends MusicBeatSubstate
levelDifficulty.updateHitbox();
add(levelDifficulty);
var deathCounter:FlxText = new FlxText(20, 15 + 64, 0, "", 32);
deathCounter.text = "Blue balled: " + PlayState.deathCounter;
deathCounter.scrollFactor.set();
deathCounter.setFormat(Paths.font('vcr.ttf'), 32);
deathCounter.updateHitbox();
add(deathCounter);
levelDifficulty.alpha = 0;
levelInfo.alpha = 0;
deathCounter.alpha = 0;
levelInfo.x = FlxG.width - (levelInfo.width + 20);
levelDifficulty.x = FlxG.width - (levelDifficulty.width + 20);
deathCounter.x = FlxG.width - (deathCounter.width + 20);
FlxTween.tween(bg, {alpha: 0.6}, 0.4, {ease: FlxEase.quartInOut});
FlxTween.tween(levelInfo, {alpha: 1, y: 20}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.3});
FlxTween.tween(levelDifficulty, {alpha: 1, y: levelDifficulty.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.5});
FlxTween.tween(deathCounter, {alpha: 1, y: deathCounter.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.7});
grpMenuShit = new FlxTypedGroup<Alphabet>();
add(grpMenuShit);
@ -108,6 +118,7 @@ class PauseSubState extends MusicBeatSubstate
case "Restart Song":
FlxG.resetState();
case "Exit to menu":
PlayState.deathCounter += 1;
FlxG.switchState(new MainMenuState());
}
}

View file

@ -49,6 +49,7 @@ class PlayState extends MusicBeatState
public static var storyWeek:Int = 0;
public static var storyPlaylist:Array<String> = [];
public static var storyDifficulty:Int = 1;
public static var deathCounter:Int = 0;
var halloweenLevel:Bool = false;
@ -124,7 +125,6 @@ class PlayState extends MusicBeatState
override public function create()
{
if (FlxG.sound.music != null)
FlxG.sound.music.stop();
@ -573,6 +573,8 @@ class PlayState extends MusicBeatState
dad.x -= 150;
dad.y += 100;
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
case 'tankman':
dad.y += 180;
}
boyfriend = new Boyfriend(770, 450, SONG.player1);
@ -870,16 +872,8 @@ class PlayState extends MusicBeatState
var introAssets:Map<String, Array<String>> = new Map<String, Array<String>>();
introAssets.set('default', ['ready', "set", "go"]);
introAssets.set('school', [
'weeb/pixelUI/ready-pixel',
'weeb/pixelUI/set-pixel',
'weeb/pixelUI/date-pixel'
]);
introAssets.set('schoolEvil', [
'weeb/pixelUI/ready-pixel',
'weeb/pixelUI/set-pixel',
'weeb/pixelUI/date-pixel'
]);
introAssets.set('school', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']);
introAssets.set('schoolEvil', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']);
var introAlts:Array<String> = introAssets.get('default');
var altSuffix:String = "";
@ -1481,6 +1475,8 @@ class PlayState extends MusicBeatState
vocals.stop();
FlxG.sound.music.stop();
deathCounter += 1;
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
// FlxG.switchState(new GameOverState(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
@ -1594,6 +1590,7 @@ class PlayState extends MusicBeatState
function endSong():Void
{
deathCounter = 0;
canPause = false;
FlxG.sound.music.volume = 0;
vocals.volume = 0;
@ -1920,29 +1917,29 @@ class PlayState extends MusicBeatState
*/
// trace(daNote.noteData);
/*
switch (daNote.noteData)
switch (daNote.noteData)
{
case 2: // NOTES YOU JUST PRESSED
if (upP || rightP || downP || leftP)
noteCheck(upP, daNote);
case 3:
if (upP || rightP || downP || leftP)
noteCheck(rightP, daNote);
case 1:
if (upP || rightP || downP || leftP)
noteCheck(downP, daNote);
case 0:
if (upP || rightP || downP || leftP)
noteCheck(leftP, daNote);
}
//this is already done in noteCheck / goodNoteHit
if (daNote.wasGoodHit)
{
case 2: // NOTES YOU JUST PRESSED
if (upP || rightP || downP || leftP)
noteCheck(upP, daNote);
case 3:
if (upP || rightP || downP || leftP)
noteCheck(rightP, daNote);
case 1:
if (upP || rightP || downP || leftP)
noteCheck(downP, daNote);
case 0:
if (upP || rightP || downP || leftP)
noteCheck(leftP, daNote);
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
//this is already done in noteCheck / goodNoteHit
if (daNote.wasGoodHit)
{
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
*/
}
else