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:
parent
6d002a8ef8
commit
0951b672e7
|
@ -497,15 +497,29 @@ class Character extends FlxSprite
|
||||||
playAnim('idle');
|
playAnim('idle');
|
||||||
case 'tankman':
|
case 'tankman':
|
||||||
frames = Paths.getSparrowAtlas('characters/tankmanCaptain');
|
frames = Paths.getSparrowAtlas('characters/tankmanCaptain');
|
||||||
|
|
||||||
animation.addByPrefix('idle', "Tankman Idle Dance", 24, false);
|
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('singUP', 'Tankman UP note0', 24, false);
|
||||||
animation.addByPrefix('singDOWN', 'Tankman DOWN 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('singUPmiss', 'Tankman UP note MISS', 24, false);
|
||||||
animation.addByPrefix('singDOWNmiss', 'Tankman DOWN 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('idle');
|
||||||
addOffset("singUP", 24, 56);
|
addOffset("singUP", 24, 56);
|
||||||
|
|
|
@ -51,15 +51,25 @@ class PauseSubState extends MusicBeatSubstate
|
||||||
levelDifficulty.updateHitbox();
|
levelDifficulty.updateHitbox();
|
||||||
add(levelDifficulty);
|
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;
|
levelDifficulty.alpha = 0;
|
||||||
levelInfo.alpha = 0;
|
levelInfo.alpha = 0;
|
||||||
|
deathCounter.alpha = 0;
|
||||||
|
|
||||||
levelInfo.x = FlxG.width - (levelInfo.width + 20);
|
levelInfo.x = FlxG.width - (levelInfo.width + 20);
|
||||||
levelDifficulty.x = FlxG.width - (levelDifficulty.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(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(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(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>();
|
grpMenuShit = new FlxTypedGroup<Alphabet>();
|
||||||
add(grpMenuShit);
|
add(grpMenuShit);
|
||||||
|
@ -108,6 +118,7 @@ class PauseSubState extends MusicBeatSubstate
|
||||||
case "Restart Song":
|
case "Restart Song":
|
||||||
FlxG.resetState();
|
FlxG.resetState();
|
||||||
case "Exit to menu":
|
case "Exit to menu":
|
||||||
|
PlayState.deathCounter += 1;
|
||||||
FlxG.switchState(new MainMenuState());
|
FlxG.switchState(new MainMenuState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ class PlayState extends MusicBeatState
|
||||||
public static var storyWeek:Int = 0;
|
public static var storyWeek:Int = 0;
|
||||||
public static var storyPlaylist:Array<String> = [];
|
public static var storyPlaylist:Array<String> = [];
|
||||||
public static var storyDifficulty:Int = 1;
|
public static var storyDifficulty:Int = 1;
|
||||||
|
public static var deathCounter:Int = 0;
|
||||||
|
|
||||||
var halloweenLevel:Bool = false;
|
var halloweenLevel:Bool = false;
|
||||||
|
|
||||||
|
@ -124,7 +125,6 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (FlxG.sound.music != null)
|
if (FlxG.sound.music != null)
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
|
@ -573,6 +573,8 @@ class PlayState extends MusicBeatState
|
||||||
dad.x -= 150;
|
dad.x -= 150;
|
||||||
dad.y += 100;
|
dad.y += 100;
|
||||||
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
||||||
|
case 'tankman':
|
||||||
|
dad.y += 180;
|
||||||
}
|
}
|
||||||
|
|
||||||
boyfriend = new Boyfriend(770, 450, SONG.player1);
|
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>>();
|
var introAssets:Map<String, Array<String>> = new Map<String, Array<String>>();
|
||||||
introAssets.set('default', ['ready', "set", "go"]);
|
introAssets.set('default', ['ready', "set", "go"]);
|
||||||
introAssets.set('school', [
|
introAssets.set('school', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel']);
|
||||||
'weeb/pixelUI/ready-pixel',
|
introAssets.set('schoolEvil', ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-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 introAlts:Array<String> = introAssets.get('default');
|
||||||
var altSuffix:String = "";
|
var altSuffix:String = "";
|
||||||
|
@ -1481,6 +1475,8 @@ class PlayState extends MusicBeatState
|
||||||
vocals.stop();
|
vocals.stop();
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
|
deathCounter += 1;
|
||||||
|
|
||||||
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
openSubState(new GameOverSubstate(boyfriend.getScreenPosition().x, boyfriend.getScreenPosition().y));
|
||||||
|
|
||||||
// FlxG.switchState(new GameOverState(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
|
function endSong():Void
|
||||||
{
|
{
|
||||||
|
deathCounter = 0;
|
||||||
canPause = false;
|
canPause = false;
|
||||||
FlxG.sound.music.volume = 0;
|
FlxG.sound.music.volume = 0;
|
||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
|
@ -1920,29 +1917,29 @@ class PlayState extends MusicBeatState
|
||||||
*/
|
*/
|
||||||
// trace(daNote.noteData);
|
// 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
|
daNote.kill();
|
||||||
if (upP || rightP || downP || leftP)
|
notes.remove(daNote, true);
|
||||||
noteCheck(upP, daNote);
|
daNote.destroy();
|
||||||
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)
|
|
||||||
{
|
|
||||||
daNote.kill();
|
|
||||||
notes.remove(daNote, true);
|
|
||||||
daNote.destroy();
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue