Merge branch 'master' of https://github.com/ninjamuffin99/funkin-secret
This commit is contained in:
commit
123bd6fb74
|
@ -9,7 +9,7 @@ using StringTools;
|
|||
|
||||
class Boyfriend extends Character
|
||||
{
|
||||
public var stunned:Bool = false;
|
||||
// public var stunned:Bool = false;
|
||||
|
||||
public function new(x:Float, y:Float, ?char:String = 'bf')
|
||||
{
|
||||
|
|
|
@ -1038,7 +1038,7 @@ class ChartingState extends MusicBeatState
|
|||
function loadJson(song:String):Void
|
||||
{
|
||||
PlayState.SONG = Song.loadFromJson(song.toLowerCase(), song.toLowerCase());
|
||||
FlxG.resetState();
|
||||
LoadingState.loadAndSwitchState(new ChartingState());
|
||||
}
|
||||
|
||||
function loadAutosave():Void
|
||||
|
|
|
@ -20,7 +20,7 @@ class FreeplayState extends MusicBeatState
|
|||
{
|
||||
var songs:Array<SongMetadata> = [];
|
||||
|
||||
var selector:FlxText;
|
||||
// var selector:FlxText;
|
||||
var curSelected:Int = 0;
|
||||
var curDifficulty:Int = 1;
|
||||
|
||||
|
@ -128,9 +128,8 @@ class FreeplayState extends MusicBeatState
|
|||
scoreText.setFormat(Paths.font("vcr.ttf"), 32, FlxColor.WHITE, RIGHT);
|
||||
// scoreText.alignment = RIGHT;
|
||||
|
||||
scoreBG = new FlxSprite(scoreText.x - 6, 0).makeGraphic(1, 66, 0xFF000000);
|
||||
scoreBG = new FlxSprite(scoreText.x - 6, 0).makeGraphic(1, 66, 0x99000000);
|
||||
scoreBG.antialiasing = false;
|
||||
scoreBG.alpha = 0.6;
|
||||
add(scoreBG);
|
||||
|
||||
diffText = new FlxText(scoreText.x, scoreText.y + 36, 0, "", 24);
|
||||
|
@ -144,10 +143,10 @@ class FreeplayState extends MusicBeatState
|
|||
|
||||
// FlxG.sound.playMusic(Paths.music('title'), 0);
|
||||
// FlxG.sound.music.fadeIn(2, 0, 0.8);
|
||||
selector = new FlxText();
|
||||
// selector = new FlxText();
|
||||
|
||||
selector.size = 40;
|
||||
selector.text = ">";
|
||||
// selector.size = 40;
|
||||
// selector.text = ">";
|
||||
// add(selector);
|
||||
|
||||
var swag:Alphabet = new Alphabet(1, 0, "swag");
|
||||
|
@ -216,13 +215,9 @@ class FreeplayState extends MusicBeatState
|
|||
var accepted = controls.ACCEPT;
|
||||
|
||||
if (upP)
|
||||
{
|
||||
changeSelection(-1);
|
||||
}
|
||||
if (downP)
|
||||
{
|
||||
changeSelection(1);
|
||||
}
|
||||
|
||||
if (FlxG.mouse.wheel != 0)
|
||||
changeSelection(-Math.round(FlxG.mouse.wheel / 4));
|
||||
|
|
|
@ -70,6 +70,9 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
// makes the lerp non-dependant on the framerate
|
||||
FlxG.camera.followLerp = CoolUtil.camLerpShit(0.01);
|
||||
|
||||
super.update(elapsed);
|
||||
|
||||
if (controls.ACCEPT)
|
||||
|
@ -96,7 +99,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
|
||||
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
|
||||
{
|
||||
FlxG.camera.follow(camFollow, LOCKON, 0.01);
|
||||
FlxG.camera.follow(camFollow, LOCKON, CoolUtil.camLerpShit(0.01));
|
||||
}
|
||||
|
||||
switch (PlayState.storyWeek)
|
||||
|
@ -111,7 +114,8 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
|
||||
FlxG.sound.play(Paths.sound('jeffGameover/jeffGameover-' + randomGameover), 1, false, null, true, function()
|
||||
{
|
||||
FlxG.sound.music.fadeIn(4, 0.2, 1);
|
||||
if (!isEnding)
|
||||
FlxG.sound.music.fadeIn(4, 0.2, 1);
|
||||
});
|
||||
}
|
||||
default:
|
||||
|
@ -130,7 +134,8 @@ class GameOverSubstate extends MusicBeatSubstate
|
|||
|
||||
private function coolStartDeath(?vol:Float = 1):Void
|
||||
{
|
||||
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol);
|
||||
if (!isEnding)
|
||||
FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol);
|
||||
}
|
||||
|
||||
override function beatHit()
|
||||
|
|
|
@ -34,7 +34,7 @@ class HealthIcon extends FlxSprite
|
|||
if (isOldIcon)
|
||||
changeIcon('bf-old');
|
||||
else
|
||||
changeIcon('bf');
|
||||
changeIcon(PlayState.SONG.player1);
|
||||
}
|
||||
|
||||
public function changeIcon(newChar:String):Void
|
||||
|
|
|
@ -260,7 +260,10 @@ class MainMenuState extends MusicBeatState
|
|||
menuItems.enabled = false;
|
||||
|
||||
if (controls.BACK && menuItems.enabled && !menuItems.busy)
|
||||
{
|
||||
FlxG.sound.play(Paths.sound('cancelMenu'));
|
||||
FlxG.switchState(new TitleState());
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ class PlayState extends MusicBeatState
|
|||
private var unspawnNotes:Array<Note> = [];
|
||||
|
||||
private var strumLine:FlxSprite;
|
||||
private var curSection:Int = 0;
|
||||
|
||||
private var camFollow:FlxObject;
|
||||
|
||||
|
@ -177,14 +176,6 @@ class PlayState extends MusicBeatState
|
|||
FlxG.cameras.reset(camGame);
|
||||
FlxG.cameras.add(camHUD, false);
|
||||
|
||||
// fake notesplash cache type deal so that it loads in the graphic?
|
||||
|
||||
grpNoteSplashes = new FlxTypedGroup<NoteSplash>();
|
||||
|
||||
var noteSplash:NoteSplash = new NoteSplash(100, 100, 0);
|
||||
grpNoteSplashes.add(noteSplash);
|
||||
noteSplash.alpha = 0.1;
|
||||
|
||||
persistentUpdate = true;
|
||||
persistentDraw = true;
|
||||
|
||||
|
@ -631,9 +622,7 @@ class PlayState extends MusicBeatState
|
|||
gfVersion = 'gf-car';
|
||||
case 'mall' | 'mallEvil':
|
||||
gfVersion = 'gf-christmas';
|
||||
case 'school':
|
||||
gfVersion = 'gf-pixel';
|
||||
case 'schoolEvil':
|
||||
case 'school' | 'schoolEvil':
|
||||
gfVersion = 'gf-pixel';
|
||||
case 'tank':
|
||||
gfVersion = 'gf-tankmen';
|
||||
|
@ -683,7 +672,6 @@ class PlayState extends MusicBeatState
|
|||
camPos.x += 600;
|
||||
tweenCamIn();
|
||||
}
|
||||
|
||||
case "spooky":
|
||||
dad.y += 200;
|
||||
case "monster":
|
||||
|
@ -697,11 +685,7 @@ class PlayState extends MusicBeatState
|
|||
dad.y += 300;
|
||||
case 'parents-christmas':
|
||||
dad.x -= 500;
|
||||
case 'senpai':
|
||||
dad.x += 150;
|
||||
dad.y += 360;
|
||||
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
||||
case 'senpai-angry':
|
||||
case 'senpai' | 'senpai-angry':
|
||||
dad.x += 150;
|
||||
dad.y += 360;
|
||||
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
|
||||
|
@ -715,12 +699,6 @@ class PlayState extends MusicBeatState
|
|||
|
||||
boyfriend = new Boyfriend(770, 450, SONG.player1);
|
||||
|
||||
switch (SONG.player1)
|
||||
{
|
||||
case "bf-holding-gf":
|
||||
// boyfriend.y -= 140;
|
||||
}
|
||||
|
||||
// REPOSITIONING PER STAGE
|
||||
switch (curStage)
|
||||
{
|
||||
|
@ -730,10 +708,8 @@ class PlayState extends MusicBeatState
|
|||
|
||||
resetFastCar();
|
||||
add(fastCar);
|
||||
|
||||
case 'mall':
|
||||
boyfriend.x += 200;
|
||||
|
||||
case 'mallEvil':
|
||||
boyfriend.x += 320;
|
||||
dad.y -= 80;
|
||||
|
@ -798,21 +774,25 @@ class PlayState extends MusicBeatState
|
|||
strumLine = new FlxSprite(0, 50).makeGraphic(FlxG.width, 10);
|
||||
|
||||
if (PreferencesMenu.getPref('downscroll'))
|
||||
{
|
||||
strumLine.y = FlxG.height - 150; // 150 just random ass number lol
|
||||
}
|
||||
|
||||
strumLine.scrollFactor.set();
|
||||
|
||||
strumLineNotes = new FlxTypedGroup<FlxSprite>();
|
||||
add(strumLineNotes);
|
||||
|
||||
// fake notesplash cache type deal so that it loads in the graphic?
|
||||
|
||||
grpNoteSplashes = new FlxTypedGroup<NoteSplash>();
|
||||
|
||||
var noteSplash:NoteSplash = new NoteSplash(100, 100, 0);
|
||||
grpNoteSplashes.add(noteSplash);
|
||||
noteSplash.alpha = 0.1;
|
||||
|
||||
add(grpNoteSplashes);
|
||||
|
||||
playerStrums = new FlxTypedGroup<FlxSprite>();
|
||||
|
||||
// startCountdown();
|
||||
|
||||
generateSong();
|
||||
|
||||
// add(strumLine);
|
||||
|
@ -917,14 +897,8 @@ class PlayState extends MusicBeatState
|
|||
});
|
||||
});
|
||||
});
|
||||
case 'senpai':
|
||||
case 'senpai' | 'roses' | 'thorns':
|
||||
schoolIntro(doof);
|
||||
case 'roses':
|
||||
FlxG.sound.play(Paths.sound('ANGRY'));
|
||||
schoolIntro(doof);
|
||||
case 'thorns':
|
||||
schoolIntro(doof);
|
||||
|
||||
case 'ugh':
|
||||
ughIntro();
|
||||
case 'stress':
|
||||
|
@ -951,7 +925,7 @@ class PlayState extends MusicBeatState
|
|||
default:
|
||||
startCountdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
super.create();
|
||||
}
|
||||
|
@ -1425,6 +1399,9 @@ class PlayState extends MusicBeatState
|
|||
add(red);
|
||||
camHUD.visible = false;
|
||||
}
|
||||
else
|
||||
FlxG.sound.play(Paths.sound('ANGRY'));
|
||||
// moved senpai angry noise in here to clean up cutscene switch case lol
|
||||
}
|
||||
|
||||
new FlxTimer().start(0.3, function(tmr:FlxTimer)
|
||||
|
@ -1432,9 +1409,7 @@ class PlayState extends MusicBeatState
|
|||
black.alpha -= 0.15;
|
||||
|
||||
if (black.alpha > 0)
|
||||
{
|
||||
tmr.reset(0.3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dialogueBox != null)
|
||||
|
@ -1449,9 +1424,7 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
senpaiEvil.alpha += 0.15;
|
||||
if (senpaiEvil.alpha < 1)
|
||||
{
|
||||
swagTimer.reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
senpaiEvil.animation.play('idle');
|
||||
|
@ -1473,9 +1446,7 @@ class PlayState extends MusicBeatState
|
|||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
add(dialogueBox);
|
||||
}
|
||||
}
|
||||
else
|
||||
startCountdown();
|
||||
|
@ -1520,91 +1491,59 @@ class PlayState extends MusicBeatState
|
|||
if (generatedMusic)
|
||||
notes.sort(sortNotes, FlxSort.DESCENDING);
|
||||
|
||||
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']);
|
||||
|
||||
var introAlts:Array<String> = introAssets.get('default');
|
||||
var introSprPaths:Array<String> = ["ready", "set", "go"];
|
||||
var altSuffix:String = "";
|
||||
|
||||
for (value in introAssets.keys())
|
||||
if (curStage.startsWith("school"))
|
||||
{
|
||||
if (value == curStage)
|
||||
{
|
||||
introAlts = introAssets.get(value);
|
||||
altSuffix = '-pixel';
|
||||
}
|
||||
altSuffix = '-pixel';
|
||||
introSprPaths = ['weeb/pixelUI/ready-pixel', 'weeb/pixelUI/set-pixel', 'weeb/pixelUI/date-pixel'];
|
||||
}
|
||||
|
||||
switch (swagCounter)
|
||||
var introSndPaths:Array<String> = ["intro3" + altSuffix, "intro2" + altSuffix,
|
||||
"intro1" + altSuffix, "introGo" + altSuffix];
|
||||
|
||||
if (swagCounter > 0)
|
||||
readySetGo(introSprPaths[swagCounter - 1]);
|
||||
FlxG.sound.play(Paths.sound(introSndPaths[swagCounter]), 0.6);
|
||||
|
||||
/* switch (swagCounter)
|
||||
{
|
||||
case 0:
|
||||
FlxG.sound.play(Paths.sound('intro3' + altSuffix), 0.6);
|
||||
|
||||
case 1:
|
||||
var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0]));
|
||||
ready.scrollFactor.set();
|
||||
ready.updateHitbox();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
ready.setGraphicSize(Std.int(ready.width * daPixelZoom));
|
||||
|
||||
ready.screenCenter();
|
||||
add(ready);
|
||||
FlxTween.tween(ready, {y: ready.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
ease: FlxEase.cubeInOut,
|
||||
onComplete: function(twn:FlxTween)
|
||||
{
|
||||
ready.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play(Paths.sound('intro2' + altSuffix), 0.6);
|
||||
|
||||
case 2:
|
||||
var set:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[1]));
|
||||
set.scrollFactor.set();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
set.setGraphicSize(Std.int(set.width * daPixelZoom));
|
||||
|
||||
set.screenCenter();
|
||||
add(set);
|
||||
FlxTween.tween(set, {y: set.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
ease: FlxEase.cubeInOut,
|
||||
onComplete: function(twn:FlxTween)
|
||||
{
|
||||
set.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play(Paths.sound('intro1' + altSuffix), 0.6);
|
||||
|
||||
case 3:
|
||||
var go:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[2]));
|
||||
go.scrollFactor.set();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
go.setGraphicSize(Std.int(go.width * daPixelZoom));
|
||||
|
||||
go.updateHitbox();
|
||||
|
||||
go.screenCenter();
|
||||
add(go);
|
||||
FlxTween.tween(go, {y: go.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
ease: FlxEase.cubeInOut,
|
||||
onComplete: function(twn:FlxTween)
|
||||
{
|
||||
go.destroy();
|
||||
}
|
||||
});
|
||||
FlxG.sound.play(Paths.sound('introGo' + altSuffix), 0.6);
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
swagCounter += 1;
|
||||
// generateSong('fresh');
|
||||
}, 4);
|
||||
}
|
||||
|
||||
function readySetGo(path:String):Void
|
||||
{
|
||||
var spr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(path));
|
||||
spr.scrollFactor.set();
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
spr.setGraphicSize(Std.int(spr.width * daPixelZoom));
|
||||
|
||||
spr.updateHitbox();
|
||||
spr.screenCenter();
|
||||
add(spr);
|
||||
FlxTween.tween(spr, {y: spr.y += 100, alpha: 0}, Conductor.crochet / 1000, {
|
||||
ease: FlxEase.cubeInOut,
|
||||
onComplete: function(twn:FlxTween)
|
||||
{
|
||||
spr.destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var previousFrameTime:Int = 0;
|
||||
var lastReportedPlayheadPosition:Int = 0;
|
||||
var songTime:Float = 0;
|
||||
|
||||
function startSong():Void
|
||||
|
@ -1612,7 +1551,6 @@ class PlayState extends MusicBeatState
|
|||
startingSong = false;
|
||||
|
||||
previousFrameTime = FlxG.game.ticks;
|
||||
lastReportedPlayheadPosition = 0;
|
||||
|
||||
if (!paused)
|
||||
FlxG.sound.playMusic(Paths.inst(SONG.song), 1, false);
|
||||
|
@ -1628,8 +1566,6 @@ class PlayState extends MusicBeatState
|
|||
#end
|
||||
}
|
||||
|
||||
var debugNum:Int = 0;
|
||||
|
||||
private function generateSong():Void
|
||||
{
|
||||
// FlxG.log.add(ChartParser.parse());
|
||||
|
@ -1658,13 +1594,8 @@ class PlayState extends MusicBeatState
|
|||
// NEW SHIT
|
||||
noteData = songData.notes;
|
||||
|
||||
var playerCounter:Int = 0;
|
||||
|
||||
var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped
|
||||
for (section in noteData)
|
||||
{
|
||||
var coolSection:Int = Std.int(section.lengthInSteps / 4);
|
||||
|
||||
for (songNotes in section.sectionNotes)
|
||||
{
|
||||
var daStrumTime:Float = songNotes[0];
|
||||
|
@ -1673,9 +1604,7 @@ class PlayState extends MusicBeatState
|
|||
var gottaHitNote:Bool = section.mustHitSection;
|
||||
|
||||
if (songNotes[1] > 3)
|
||||
{
|
||||
gottaHitNote = !section.mustHitSection;
|
||||
}
|
||||
|
||||
var oldNote:Note;
|
||||
if (unspawnNotes.length > 0)
|
||||
|
@ -1704,25 +1633,16 @@ class PlayState extends MusicBeatState
|
|||
sustainNote.mustPress = gottaHitNote;
|
||||
|
||||
if (sustainNote.mustPress)
|
||||
{
|
||||
sustainNote.x += FlxG.width / 2; // general offset
|
||||
}
|
||||
}
|
||||
|
||||
swagNote.mustPress = gottaHitNote;
|
||||
|
||||
if (swagNote.mustPress)
|
||||
{
|
||||
swagNote.x += FlxG.width / 2; // general offset
|
||||
}
|
||||
else {}
|
||||
}
|
||||
daBeats += 1;
|
||||
}
|
||||
|
||||
// trace(unspawnNotes.length);
|
||||
// playerCounter += 1;
|
||||
|
||||
unspawnNotes.sort(sortByShit);
|
||||
|
||||
generatedMusic = true;
|
||||
|
@ -1840,9 +1760,7 @@ class PlayState extends MusicBeatState
|
|||
babyArrow.ID = i;
|
||||
|
||||
if (player == 1)
|
||||
{
|
||||
playerStrums.add(babyArrow);
|
||||
}
|
||||
|
||||
babyArrow.animation.play('static');
|
||||
babyArrow.x += 50;
|
||||
|
@ -1879,9 +1797,7 @@ class PlayState extends MusicBeatState
|
|||
if (paused)
|
||||
{
|
||||
if (FlxG.sound.music != null && !startingSong)
|
||||
{
|
||||
resyncVocals();
|
||||
}
|
||||
|
||||
if (!startTimer.finished)
|
||||
startTimer.active = true;
|
||||
|
@ -1889,13 +1805,9 @@ class PlayState extends MusicBeatState
|
|||
|
||||
#if discord_rpc
|
||||
if (startTimer.finished)
|
||||
{
|
||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC, true, songLength - Conductor.songPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
|
@ -1908,13 +1820,9 @@ class PlayState extends MusicBeatState
|
|||
if (health > 0 && !paused && FlxG.autoPause)
|
||||
{
|
||||
if (Conductor.songPosition > 0.0)
|
||||
{
|
||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC, true, songLength - Conductor.songPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
DiscordClient.changePresence(detailsText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||
}
|
||||
}
|
||||
|
||||
super.onFocus();
|
||||
|
@ -1923,9 +1831,7 @@ class PlayState extends MusicBeatState
|
|||
override public function onFocusLost():Void
|
||||
{
|
||||
if (health > 0 && !paused && FlxG.autoPause)
|
||||
{
|
||||
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + storyDifficultyText + ")", iconRPC);
|
||||
}
|
||||
|
||||
super.onFocusLost();
|
||||
}
|
||||
|
@ -1960,9 +1866,6 @@ class PlayState extends MusicBeatState
|
|||
perfectMode = false;
|
||||
#end
|
||||
|
||||
if (FlxG.keys.justPressed.NINE)
|
||||
iconP1.swapOldIcon();
|
||||
|
||||
// do this BEFORE super.update() so songPosition is accurate
|
||||
if (startingSong)
|
||||
{
|
||||
|
@ -1992,7 +1895,6 @@ class PlayState extends MusicBeatState
|
|||
// trace('MISSED FRAME');
|
||||
}
|
||||
}
|
||||
|
||||
// Conductor.lastSongPos = FlxG.sound.music.time;
|
||||
}
|
||||
|
||||
|
@ -2056,6 +1958,9 @@ class PlayState extends MusicBeatState
|
|||
#end
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.NINE)
|
||||
iconP1.swapOldIcon();
|
||||
|
||||
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
|
||||
// FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight);
|
||||
|
||||
|
@ -2087,13 +1992,25 @@ class PlayState extends MusicBeatState
|
|||
FlxG.switchState(new Charting()); */
|
||||
|
||||
#if debug
|
||||
if (FlxG.keys.justPressed.ONE)
|
||||
endSong();
|
||||
if (FlxG.keys.justPressed.EIGHT)
|
||||
{
|
||||
/* 8 for opponent char
|
||||
SHIFT+8 for player char
|
||||
CTRL+SHIFT+8 for gf */
|
||||
if (FlxG.keys.pressed.SHIFT)
|
||||
FlxG.switchState(new AnimationDebug(SONG.player1));
|
||||
if (FlxG.keys.pressed.CONTROL)
|
||||
FlxG.switchState(new AnimationDebug(gf.curCharacter));
|
||||
else
|
||||
FlxG.switchState(new AnimationDebug(SONG.player1));
|
||||
else
|
||||
FlxG.switchState(new AnimationDebug(SONG.player2));
|
||||
}
|
||||
if (FlxG.keys.justPressed.PAGEUP)
|
||||
changeSection(1);
|
||||
if (FlxG.keys.justPressed.PAGEDOWN)
|
||||
changeSection(-1);
|
||||
#end
|
||||
|
||||
if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null)
|
||||
|
@ -2162,7 +2079,7 @@ class PlayState extends MusicBeatState
|
|||
|
||||
if (health <= 0 && !practiceMode)
|
||||
{
|
||||
boyfriend.stunned = true;
|
||||
// boyfriend.stunned = true;
|
||||
|
||||
persistentUpdate = false;
|
||||
persistentDraw = false;
|
||||
|
@ -2199,7 +2116,8 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
notes.forEachAlive(function(daNote:Note)
|
||||
{
|
||||
if (daNote.y > FlxG.height)
|
||||
if ((PreferencesMenu.getPref('downscroll') && daNote.y < -daNote.height)
|
||||
|| (!PreferencesMenu.getPref('downscroll') && daNote.y > FlxG.height))
|
||||
{
|
||||
daNote.active = false;
|
||||
daNote.visible = false;
|
||||
|
@ -2292,17 +2210,32 @@ class PlayState extends MusicBeatState
|
|||
// WIP interpolation shit? Need to fix the pause issue
|
||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * SONG.speed));
|
||||
|
||||
var noteMiss:Bool = daNote.y < -daNote.height;
|
||||
// removing this so whether the note misses or not is entirely up to Note class
|
||||
// var noteMiss:Bool = daNote.y < -daNote.height;
|
||||
|
||||
if (PreferencesMenu.getPref('downscroll'))
|
||||
noteMiss = daNote.y > FlxG.height;
|
||||
// if (PreferencesMenu.getPref('downscroll'))
|
||||
// noteMiss = daNote.y > FlxG.height;
|
||||
|
||||
if (noteMiss)
|
||||
if (daNote.isSustainNote && daNote.wasGoodHit)
|
||||
{
|
||||
if (daNote.tooLate || !daNote.wasGoodHit)
|
||||
if ((!PreferencesMenu.getPref('downscroll') && daNote.y < -daNote.height)
|
||||
|| (PreferencesMenu.getPref('downscroll') && daNote.y > FlxG.height))
|
||||
{
|
||||
daNote.active = false;
|
||||
daNote.visible = false;
|
||||
|
||||
daNote.kill();
|
||||
notes.remove(daNote, true);
|
||||
daNote.destroy();
|
||||
}
|
||||
}
|
||||
else if (daNote.tooLate || daNote.wasGoodHit)
|
||||
{
|
||||
if (daNote.tooLate)
|
||||
{
|
||||
health -= 0.0475;
|
||||
vocals.volume = 0;
|
||||
killCombo();
|
||||
}
|
||||
|
||||
daNote.active = false;
|
||||
|
@ -2317,13 +2250,40 @@ class PlayState extends MusicBeatState
|
|||
|
||||
if (!inCutscene)
|
||||
keyShit();
|
||||
|
||||
#if debug
|
||||
if (FlxG.keys.justPressed.ONE)
|
||||
endSong();
|
||||
#end
|
||||
}
|
||||
|
||||
function killCombo():Void
|
||||
{
|
||||
if (combo > 5 && gf.animOffsets.exists('sad'))
|
||||
gf.playAnim('sad');
|
||||
if (combo != 0)
|
||||
{
|
||||
combo = 0;
|
||||
displayCombo();
|
||||
}
|
||||
}
|
||||
|
||||
#if debug
|
||||
function changeSection(sec:Int):Void
|
||||
{
|
||||
FlxG.sound.music.pause();
|
||||
|
||||
var daBPM:Float = SONG.bpm;
|
||||
var daPos:Float = 0;
|
||||
for (i in 0...(Std.int(curStep / 16 + sec)))
|
||||
{
|
||||
if (SONG.notes[i].changeBPM)
|
||||
{
|
||||
daBPM = SONG.notes[i].bpm;
|
||||
}
|
||||
daPos += 4 * (1000 * 60 / daBPM);
|
||||
}
|
||||
Conductor.songPosition = FlxG.sound.music.time = daPos;
|
||||
updateCurStep();
|
||||
resyncVocals();
|
||||
}
|
||||
#end
|
||||
|
||||
function endSong():Void
|
||||
{
|
||||
seenCutscene = false;
|
||||
|
@ -2421,19 +2381,13 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
}
|
||||
|
||||
// gives score and pops up rating
|
||||
private function popUpScore(strumtime:Float, daNote:Note):Void
|
||||
{
|
||||
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
||||
// boyfriend.playAnim('hey');
|
||||
vocals.volume = 1;
|
||||
|
||||
var placement:String = Std.string(combo);
|
||||
|
||||
var coolText:FlxText = new FlxText(0, 0, 0, placement, 32);
|
||||
coolText.screenCenter();
|
||||
coolText.x = FlxG.width * 0.55;
|
||||
//
|
||||
|
||||
var rating:FlxSprite = new FlxSprite();
|
||||
var score:Int = 350;
|
||||
|
||||
|
@ -2472,6 +2426,7 @@ class PlayState extends MusicBeatState
|
|||
if (!practiceMode)
|
||||
songScore += score;
|
||||
|
||||
// ludum dare rating system
|
||||
/* if (combo > 60)
|
||||
daRating = 'sick';
|
||||
else if (combo > 12)
|
||||
|
@ -2480,6 +2435,45 @@ class PlayState extends MusicBeatState
|
|||
daRating = 'bad';
|
||||
*/
|
||||
|
||||
var ratingPath:String = daRating;
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
ratingPath = "weeb/pixelUI/" + ratingPath + "-pixel";
|
||||
|
||||
rating.loadGraphic(Paths.image(ratingPath));
|
||||
rating.screenCenter();
|
||||
rating.x = FlxG.width * 0.55 - 40;
|
||||
rating.y -= 60;
|
||||
rating.acceleration.y = 550;
|
||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||
|
||||
add(rating);
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7));
|
||||
}
|
||||
else
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * 0.7));
|
||||
rating.antialiasing = true;
|
||||
}
|
||||
rating.updateHitbox();
|
||||
|
||||
FlxTween.tween(rating, {alpha: 0}, 0.2, {
|
||||
onComplete: function(tween:FlxTween)
|
||||
{
|
||||
rating.destroy();
|
||||
},
|
||||
startDelay: Conductor.crochet * 0.001
|
||||
});
|
||||
if (combo >= 10 || combo == 0)
|
||||
displayCombo();
|
||||
}
|
||||
|
||||
function displayCombo():Void
|
||||
{
|
||||
var pixelShitPart1:String = "";
|
||||
var pixelShitPart2:String = '';
|
||||
|
||||
|
@ -2489,70 +2483,72 @@ class PlayState extends MusicBeatState
|
|||
pixelShitPart2 = '-pixel';
|
||||
}
|
||||
|
||||
rating.loadGraphic(Paths.image(pixelShitPart1 + daRating + pixelShitPart2));
|
||||
rating.screenCenter();
|
||||
rating.x = coolText.x - 40;
|
||||
rating.y -= 60;
|
||||
rating.acceleration.y = 550;
|
||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||
|
||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||
comboSpr.screenCenter();
|
||||
comboSpr.x = coolText.x;
|
||||
comboSpr.x = FlxG.width * 0.55;
|
||||
comboSpr.y += 80;
|
||||
comboSpr.acceleration.y = 600;
|
||||
comboSpr.velocity.y -= 150;
|
||||
|
||||
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
||||
add(rating);
|
||||
|
||||
if (!curStage.startsWith('school'))
|
||||
add(comboSpr);
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * 0.7));
|
||||
rating.antialiasing = true;
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
||||
comboSpr.antialiasing = true;
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7));
|
||||
}
|
||||
else
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7));
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7));
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
||||
comboSpr.antialiasing = true;
|
||||
}
|
||||
|
||||
comboSpr.updateHitbox();
|
||||
rating.updateHitbox();
|
||||
|
||||
FlxTween.tween(comboSpr, {alpha: 0}, 0.2, {
|
||||
onComplete: function(tween:FlxTween)
|
||||
{
|
||||
comboSpr.destroy();
|
||||
},
|
||||
startDelay: Conductor.crochet * 0.001
|
||||
});
|
||||
|
||||
var seperatedScore:Array<Int> = [];
|
||||
var tempCombo:Int = combo;
|
||||
|
||||
seperatedScore.push(Math.floor(combo / 100));
|
||||
seperatedScore.push(Math.floor((combo - (seperatedScore[0] * 100)) / 10));
|
||||
seperatedScore.push(combo % 10);
|
||||
while (tempCombo != 0)
|
||||
{
|
||||
seperatedScore.push(tempCombo % 10);
|
||||
tempCombo = Std.int(tempCombo / 10);
|
||||
}
|
||||
while (seperatedScore.length < 3)
|
||||
seperatedScore.push(0);
|
||||
|
||||
var daLoop:Int = 0;
|
||||
// seperatedScore.reverse();
|
||||
|
||||
var daLoop:Int = 1;
|
||||
for (i in seperatedScore)
|
||||
{
|
||||
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2));
|
||||
numScore.screenCenter();
|
||||
numScore.x = coolText.x + (43 * daLoop) - 90;
|
||||
numScore.y += 80;
|
||||
numScore.y = comboSpr.y + 80;
|
||||
numScore.y = comboSpr.y;
|
||||
|
||||
if (!curStage.startsWith('school'))
|
||||
if (curStage.startsWith('school'))
|
||||
{
|
||||
numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom));
|
||||
}
|
||||
else
|
||||
{
|
||||
numScore.antialiasing = true;
|
||||
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
|
||||
}
|
||||
else
|
||||
{
|
||||
numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom));
|
||||
}
|
||||
numScore.updateHitbox();
|
||||
|
||||
numScore.x = comboSpr.x - (43 * daLoop); //- 90;
|
||||
numScore.acceleration.y = FlxG.random.int(200, 300);
|
||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||
|
||||
if (combo >= 10 || combo == 0)
|
||||
add(numScore);
|
||||
add(numScore);
|
||||
|
||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||
onComplete: function(tween:FlxTween)
|
||||
|
@ -2564,30 +2560,6 @@ class PlayState extends MusicBeatState
|
|||
|
||||
daLoop++;
|
||||
}
|
||||
/*
|
||||
trace(combo);
|
||||
trace(seperatedScore);
|
||||
*/
|
||||
|
||||
coolText.text = Std.string(seperatedScore);
|
||||
// add(coolText);
|
||||
|
||||
FlxTween.tween(rating, {alpha: 0}, 0.2, {
|
||||
startDelay: Conductor.crochet * 0.001
|
||||
});
|
||||
|
||||
FlxTween.tween(comboSpr, {alpha: 0}, 0.2, {
|
||||
onComplete: function(tween:FlxTween)
|
||||
{
|
||||
coolText.destroy();
|
||||
comboSpr.destroy();
|
||||
|
||||
rating.destroy();
|
||||
},
|
||||
startDelay: Conductor.crochet * 0.001
|
||||
});
|
||||
|
||||
curSection += 1;
|
||||
}
|
||||
|
||||
var cameraRightSide:Bool = false;
|
||||
|
@ -2612,9 +2584,7 @@ class PlayState extends MusicBeatState
|
|||
vocals.volume = 1;
|
||||
|
||||
if (SONG.song.toLowerCase() == 'tutorial')
|
||||
{
|
||||
tweenCamIn();
|
||||
}
|
||||
}
|
||||
|
||||
if (cameraRightSide && camFollow.x != boyfriend.getMidpoint().x - 100)
|
||||
|
@ -2627,18 +2597,13 @@ class PlayState extends MusicBeatState
|
|||
camFollow.x = boyfriend.getMidpoint().x - 300;
|
||||
case 'mall':
|
||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
||||
case 'school':
|
||||
camFollow.x = boyfriend.getMidpoint().x - 200;
|
||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
||||
case 'schoolEvil':
|
||||
case 'school' | 'schoolEvil':
|
||||
camFollow.x = boyfriend.getMidpoint().x - 200;
|
||||
camFollow.y = boyfriend.getMidpoint().y - 200;
|
||||
}
|
||||
|
||||
if (SONG.song.toLowerCase() == 'tutorial')
|
||||
{
|
||||
FlxTween.tween(FlxG.camera, {zoom: 1}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2725,7 +2690,7 @@ class PlayState extends MusicBeatState
|
|||
for (shit in 0...pressArray.length)
|
||||
{ // if a direction is hit that shouldn't be
|
||||
if (pressArray[shit] && !directionList.contains(shit))
|
||||
badNoteHit();
|
||||
noteMiss(shit);
|
||||
}
|
||||
for (coolNote in possibleNotes)
|
||||
{
|
||||
|
@ -2735,7 +2700,9 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
badNoteHit();
|
||||
for (shit in 0...pressArray.length)
|
||||
if (pressArray[shit])
|
||||
noteMiss(shit);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2767,44 +2734,39 @@ class PlayState extends MusicBeatState
|
|||
|
||||
function noteMiss(direction:Int = 1):Void
|
||||
{
|
||||
if (!boyfriend.stunned)
|
||||
// whole function used to be encased in if (!boyfriend.stunned)
|
||||
health -= 0.04;
|
||||
killCombo();
|
||||
|
||||
if (!practiceMode)
|
||||
songScore -= 10;
|
||||
|
||||
vocals.volume = 0;
|
||||
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
||||
|
||||
/* boyfriend.stunned = true;
|
||||
|
||||
// get stunned for 5 seconds
|
||||
new FlxTimer().start(5 / 60, function(tmr:FlxTimer)
|
||||
{
|
||||
health -= 0.04;
|
||||
if (combo > 5 && gf.animOffsets.exists('sad'))
|
||||
{
|
||||
gf.playAnim('sad');
|
||||
}
|
||||
combo = 0;
|
||||
boyfriend.stunned = false;
|
||||
}); */
|
||||
|
||||
if (!practiceMode)
|
||||
songScore -= 10;
|
||||
|
||||
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
||||
// FlxG.sound.play(Paths.sound('missnote1'), 1, false);
|
||||
// FlxG.log.add('played imss note');
|
||||
|
||||
boyfriend.stunned = true;
|
||||
|
||||
// get stunned for 5 seconds
|
||||
new FlxTimer().start(5 / 60, function(tmr:FlxTimer)
|
||||
{
|
||||
boyfriend.stunned = false;
|
||||
});
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
boyfriend.playAnim('singLEFTmiss', true);
|
||||
case 1:
|
||||
boyfriend.playAnim('singDOWNmiss', true);
|
||||
case 2:
|
||||
boyfriend.playAnim('singUPmiss', true);
|
||||
case 3:
|
||||
boyfriend.playAnim('singRIGHTmiss', true);
|
||||
}
|
||||
switch (direction)
|
||||
{
|
||||
case 0:
|
||||
boyfriend.playAnim('singLEFTmiss', true);
|
||||
case 1:
|
||||
boyfriend.playAnim('singDOWNmiss', true);
|
||||
case 2:
|
||||
boyfriend.playAnim('singUPmiss', true);
|
||||
case 3:
|
||||
boyfriend.playAnim('singRIGHTmiss', true);
|
||||
}
|
||||
}
|
||||
|
||||
/* not used anymore lol
|
||||
|
||||
function badNoteHit()
|
||||
{
|
||||
// just double pasting this shit cuz fuk u
|
||||
|
@ -2822,7 +2784,7 @@ class PlayState extends MusicBeatState
|
|||
noteMiss(2);
|
||||
if (rightP)
|
||||
noteMiss(3);
|
||||
}
|
||||
} */
|
||||
|
||||
function goodNoteHit(note:Note):Void
|
||||
{
|
||||
|
@ -2830,8 +2792,8 @@ class PlayState extends MusicBeatState
|
|||
{
|
||||
if (!note.isSustainNote)
|
||||
{
|
||||
popUpScore(note.strumTime, note);
|
||||
combo += 1;
|
||||
popUpScore(note.strumTime, note);
|
||||
}
|
||||
|
||||
if (note.noteData >= 0)
|
||||
|
@ -3041,9 +3003,7 @@ class PlayState extends MusicBeatState
|
|||
iconP2.updateHitbox();
|
||||
|
||||
if (curBeat % gfSpeed == 0)
|
||||
{
|
||||
gf.dance();
|
||||
}
|
||||
|
||||
if (curBeat % 2 == 0)
|
||||
{
|
||||
|
@ -3074,6 +3034,7 @@ class PlayState extends MusicBeatState
|
|||
spr.dance();
|
||||
});
|
||||
|
||||
// boppin friends
|
||||
switch (curStage)
|
||||
{
|
||||
case 'school':
|
||||
|
|
|
@ -48,6 +48,7 @@ import sys.thread.Thread;
|
|||
class TitleState extends MusicBeatState
|
||||
{
|
||||
public static var initialized:Bool = false;
|
||||
var startedIntro:Bool;
|
||||
|
||||
var blackScreen:FlxSprite;
|
||||
var credGroup:FlxGroup;
|
||||
|
@ -73,6 +74,8 @@ class TitleState extends MusicBeatState
|
|||
// FlxG.bitmap.clearCache();
|
||||
#end
|
||||
|
||||
startedIntro = false;
|
||||
|
||||
FlxG.game.focusLostFramerate = 60;
|
||||
|
||||
swagShader = new ColorSwap();
|
||||
|
@ -222,20 +225,11 @@ class TitleState extends MusicBeatState
|
|||
new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4));
|
||||
FlxTransitionableState.defaultTransOut = new TransitionData(FADE, FlxColor.BLACK, 0.7, new FlxPoint(0, 1),
|
||||
{asset: diamond, width: 32, height: 32}, new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4));
|
||||
}
|
||||
|
||||
transIn = FlxTransitionableState.defaultTransIn;
|
||||
transOut = FlxTransitionableState.defaultTransOut;
|
||||
|
||||
// HAD TO MODIFY SOME BACKEND SHIT
|
||||
// IF THIS PR IS HERE IF ITS ACCEPTED UR GOOD TO GO
|
||||
// https://github.com/HaxeFlixel/flixel-addons/pull/348
|
||||
|
||||
// var music:FlxSound = new FlxSound();
|
||||
// music.loadStream(Paths.music('freakyMenu'));
|
||||
// FlxG.sound.list.add(music);
|
||||
// music.play();
|
||||
if (FlxG.sound.music == null || !FlxG.sound.music.playing)
|
||||
{
|
||||
FlxG.sound.playMusic(Paths.music('freakyMenu'), 0);
|
||||
|
||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||
}
|
||||
|
||||
|
@ -331,6 +325,7 @@ class TitleState extends MusicBeatState
|
|||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.onComplete = function() FlxG.switchState(new VideoState());
|
||||
|
||||
startedIntro = true;
|
||||
// credGroup.add(credTextShit);
|
||||
}
|
||||
|
||||
|
@ -353,8 +348,10 @@ class TitleState extends MusicBeatState
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
#if debug
|
||||
if (FlxG.keys.justPressed.EIGHT)
|
||||
FlxG.switchState(new CutsceneAnimTestState());
|
||||
#end
|
||||
|
||||
/*
|
||||
if (FlxG.keys.justPressed.R)
|
||||
|
@ -372,9 +369,7 @@ class TitleState extends MusicBeatState
|
|||
// FlxG.watch.addQuick('amp', FlxG.sound.music.amplitude);
|
||||
|
||||
if (FlxG.keys.justPressed.F)
|
||||
{
|
||||
FlxG.fullscreen = !FlxG.fullscreen;
|
||||
}
|
||||
|
||||
var pressedEnter:Bool = FlxG.keys.justPressed.ENTER;
|
||||
|
||||
|
@ -382,17 +377,10 @@ class TitleState extends MusicBeatState
|
|||
for (touch in FlxG.touches.list)
|
||||
{
|
||||
if (touch.justPressed)
|
||||
{
|
||||
pressedEnter = true;
|
||||
}
|
||||
}
|
||||
#end
|
||||
|
||||
if (FlxG.keys.justPressed.FIVE)
|
||||
{
|
||||
FlxG.switchState(new CutsceneAnimTestState());
|
||||
}
|
||||
|
||||
var gamepad:FlxGamepad = FlxG.gamepads.lastActive;
|
||||
|
||||
if (gamepad != null)
|
||||
|
@ -456,9 +444,7 @@ class TitleState extends MusicBeatState
|
|||
}
|
||||
|
||||
if (pressedEnter && !skippedIntro && initialized)
|
||||
{
|
||||
skipIntro();
|
||||
}
|
||||
/*
|
||||
#if web
|
||||
if (!initialized && controls.ACCEPT)
|
||||
|
@ -476,16 +462,10 @@ class TitleState extends MusicBeatState
|
|||
// swagShader.hasOutline = !swagShader.hasOutline;
|
||||
|
||||
if (controls.UI_LEFT)
|
||||
{
|
||||
swagShader.update(-elapsed * 0.1);
|
||||
// alphaShader.update(-elapsed * 0.1);
|
||||
}
|
||||
|
||||
if (controls.UI_RIGHT)
|
||||
{
|
||||
swagShader.update(elapsed * 0.1);
|
||||
// alphaShader.update(elapsed * 0.1);
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
@ -526,75 +506,83 @@ class TitleState extends MusicBeatState
|
|||
{
|
||||
super.beatHit();
|
||||
|
||||
logoBl.animation.play('bump', true);
|
||||
if (!startedIntro)
|
||||
return ;
|
||||
|
||||
danceLeft = !danceLeft;
|
||||
|
||||
if (danceLeft)
|
||||
gfDance.animation.play('danceRight');
|
||||
else
|
||||
gfDance.animation.play('danceLeft');
|
||||
|
||||
FlxG.log.add(curBeat);
|
||||
// if the user is draggin the window some beats will
|
||||
// be missed so this is just to compensate
|
||||
if (curBeat > lastBeat)
|
||||
if (skippedIntro)
|
||||
{
|
||||
for (i in lastBeat...curBeat)
|
||||
logoBl.animation.play('bump', true);
|
||||
|
||||
danceLeft = !danceLeft;
|
||||
|
||||
if (danceLeft)
|
||||
gfDance.animation.play('danceRight');
|
||||
else
|
||||
gfDance.animation.play('danceLeft');
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxG.log.add(curBeat);
|
||||
// if the user is draggin the window some beats will
|
||||
// be missed so this is just to compensate
|
||||
if (curBeat > lastBeat)
|
||||
{
|
||||
switch (i + 1)
|
||||
for (i in lastBeat...curBeat)
|
||||
{
|
||||
case 1:
|
||||
createCoolText(['ninjamuffin99', 'phantomArcade', 'kawaisprite', 'evilsk8er']);
|
||||
// credTextShit.visible = true;
|
||||
case 3:
|
||||
addMoreText('present');
|
||||
// credTextShit.text += '\npresent...';
|
||||
// credTextShit.addText();
|
||||
case 4:
|
||||
deleteCoolText();
|
||||
// credTextShit.visible = false;
|
||||
// credTextShit.text = 'In association \nwith';
|
||||
// credTextShit.screenCenter();
|
||||
case 5:
|
||||
createCoolText(['In association', 'with']);
|
||||
case 7:
|
||||
addMoreText('newgrounds');
|
||||
ngSpr.visible = true;
|
||||
// credTextShit.text += '\nNewgrounds';
|
||||
case 8:
|
||||
deleteCoolText();
|
||||
ngSpr.visible = false;
|
||||
// credTextShit.visible = false;
|
||||
switch (i + 1)
|
||||
{
|
||||
case 1:
|
||||
createCoolText(['ninjamuffin99', 'phantomArcade', 'kawaisprite', 'evilsk8er']);
|
||||
// credTextShit.visible = true;
|
||||
case 3:
|
||||
addMoreText('present');
|
||||
// credTextShit.text += '\npresent...';
|
||||
// credTextShit.addText();
|
||||
case 4:
|
||||
deleteCoolText();
|
||||
// credTextShit.visible = false;
|
||||
// credTextShit.text = 'In association \nwith';
|
||||
// credTextShit.screenCenter();
|
||||
case 5:
|
||||
createCoolText(['In association', 'with']);
|
||||
case 7:
|
||||
addMoreText('newgrounds');
|
||||
ngSpr.visible = true;
|
||||
// credTextShit.text += '\nNewgrounds';
|
||||
case 8:
|
||||
deleteCoolText();
|
||||
ngSpr.visible = false;
|
||||
// credTextShit.visible = false;
|
||||
|
||||
// credTextShit.text = 'Shoutouts Tom Fulp';
|
||||
// credTextShit.screenCenter();
|
||||
case 9:
|
||||
createCoolText([curWacky[0]]);
|
||||
// credTextShit.visible = true;
|
||||
case 11:
|
||||
addMoreText(curWacky[1]);
|
||||
// credTextShit.text += '\nlmao';
|
||||
case 12:
|
||||
deleteCoolText();
|
||||
// credTextShit.visible = false;
|
||||
// credTextShit.text = "Friday";
|
||||
// credTextShit.screenCenter();
|
||||
case 13:
|
||||
addMoreText('Friday');
|
||||
// credTextShit.visible = true;
|
||||
case 14:
|
||||
addMoreText('Night');
|
||||
// credTextShit.text += '\nNight';
|
||||
case 15:
|
||||
addMoreText('Funkin'); // credTextShit.text += '\nFunkin';
|
||||
// credTextShit.text = 'Shoutouts Tom Fulp';
|
||||
// credTextShit.screenCenter();
|
||||
case 9:
|
||||
createCoolText([curWacky[0]]);
|
||||
// credTextShit.visible = true;
|
||||
case 11:
|
||||
addMoreText(curWacky[1]);
|
||||
// credTextShit.text += '\nlmao';
|
||||
case 12:
|
||||
deleteCoolText();
|
||||
// credTextShit.visible = false;
|
||||
// credTextShit.text = "Friday";
|
||||
// credTextShit.screenCenter();
|
||||
case 13:
|
||||
addMoreText('Friday');
|
||||
// credTextShit.visible = true;
|
||||
case 14:
|
||||
addMoreText('Night');
|
||||
// credTextShit.text += '\nNight';
|
||||
case 15:
|
||||
addMoreText('Funkin'); // credTextShit.text += '\nFunkin';
|
||||
|
||||
case 16:
|
||||
skipIntro();
|
||||
case 16:
|
||||
skipIntro();
|
||||
}
|
||||
}
|
||||
}
|
||||
lastBeat = curBeat;
|
||||
}
|
||||
lastBeat = curBeat;
|
||||
}
|
||||
|
||||
var skippedIntro:Bool = false;
|
||||
|
|
|
@ -215,7 +215,7 @@ class OptionsMenu extends Page
|
|||
}
|
||||
|
||||
/**
|
||||
* True if this page has multiple options, ecluding the exit option.
|
||||
* True if this page has multiple options, excluding the exit option.
|
||||
* If false, there's no reason to ever show this page.
|
||||
*/
|
||||
public function hasMultipleOptions():Bool
|
||||
|
@ -267,11 +267,12 @@ class OptionsMenu extends Page
|
|||
|
||||
function checkLoginStatus()
|
||||
{
|
||||
// this shit don't work!! wtf!!!!
|
||||
var prevLoggedIn = items.has("logout");
|
||||
if (prevLoggedIn && !NGio.isLoggedIn)
|
||||
items.resetItem("login", "logout", selectLogout);
|
||||
else if (!prevLoggedIn && NGio.isLoggedIn)
|
||||
items.resetItem("logout", "login", selectLogin);
|
||||
else if (!prevLoggedIn && NGio.isLoggedIn)
|
||||
items.resetItem("login", "logout", selectLogout);
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue