Merge branch 'master' of github.com:ninjamuffin99/Funkin-secret into nitpix
This commit is contained in:
commit
72e78349c9
|
@ -2,7 +2,7 @@
|
||||||
<project>
|
<project>
|
||||||
<!-- _________________________ Application Settings _________________________ -->
|
<!-- _________________________ Application Settings _________________________ -->
|
||||||
|
|
||||||
<app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" package="com.ninjamuffin99.funkin" main="Main" version="0.2.7.1" company="ninjamuffin99" />
|
<app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" package="com.ninjamuffin99.funkin" main="Main" version="0.2.8" company="ninjamuffin99" />
|
||||||
|
|
||||||
<!--Switch Export with Unique ApplicationID and Icon-->
|
<!--Switch Export with Unique ApplicationID and Icon-->
|
||||||
<set name="APP_ID" value="0x0100f6c013bbc000" />
|
<set name="APP_ID" value="0x0100f6c013bbc000" />
|
||||||
|
@ -125,10 +125,11 @@
|
||||||
<!--haxelib name="newgrounds" unless="switch"/> -->
|
<!--haxelib name="newgrounds" unless="switch"/> -->
|
||||||
<haxelib name="faxe" if='switch'/>
|
<haxelib name="faxe" if='switch'/>
|
||||||
<haxelib name="polymod"/>
|
<haxelib name="polymod"/>
|
||||||
|
<haxelib name="newgrounds"/>
|
||||||
<haxelib name="hxcpp-debug-server" if="desktop debug"/>
|
<haxelib name="hxcpp-debug-server" if="desktop debug"/>
|
||||||
|
|
||||||
<haxelib name="flixel-animate" />
|
<!-- <haxelib name="flixel-animate" /> -->
|
||||||
<haxelib name="spinehaxe" />
|
<!-- <haxelib name="spinehaxe" /> -->
|
||||||
<!-- https://github.com/ninjamuffin99/Flixel-Animate-Atlas-Player -->
|
<!-- https://github.com/ninjamuffin99/Flixel-Animate-Atlas-Player -->
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 61 KiB |
Binary file not shown.
Before Width: | Height: | Size: 552 KiB After Width: | Height: | Size: 534 KiB |
|
@ -9,7 +9,7 @@ using StringTools;
|
||||||
|
|
||||||
class Boyfriend extends Character
|
class Boyfriend extends Character
|
||||||
{
|
{
|
||||||
public var stunned:Bool = false;
|
// public var stunned:Bool = false;
|
||||||
|
|
||||||
public function new(x:Float, y:Float, ?char:String = 'bf')
|
public function new(x:Float, y:Float, ?char:String = 'bf')
|
||||||
{
|
{
|
||||||
|
|
|
@ -1038,7 +1038,7 @@ class ChartingState extends MusicBeatState
|
||||||
function loadJson(song:String):Void
|
function loadJson(song:String):Void
|
||||||
{
|
{
|
||||||
PlayState.SONG = Song.loadFromJson(song.toLowerCase(), song.toLowerCase());
|
PlayState.SONG = Song.loadFromJson(song.toLowerCase(), song.toLowerCase());
|
||||||
FlxG.resetState();
|
LoadingState.loadAndSwitchState(new ChartingState());
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadAutosave():Void
|
function loadAutosave():Void
|
||||||
|
|
|
@ -70,6 +70,9 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
// makes the lerp non-dependant on the framerate
|
||||||
|
FlxG.camera.followLerp = CoolUtil.camLerpShit(0.01);
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
if (controls.ACCEPT)
|
if (controls.ACCEPT)
|
||||||
|
@ -96,7 +99,7 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||||
|
|
||||||
if (bf.animation.curAnim.name == 'firstDeath' && bf.animation.curAnim.curFrame == 12)
|
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)
|
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.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:
|
default:
|
||||||
|
@ -130,7 +134,8 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||||
|
|
||||||
private function coolStartDeath(?vol:Float = 1):Void
|
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()
|
override function beatHit()
|
||||||
|
|
|
@ -34,7 +34,7 @@ class HealthIcon extends FlxSprite
|
||||||
if (isOldIcon)
|
if (isOldIcon)
|
||||||
changeIcon('bf-old');
|
changeIcon('bf-old');
|
||||||
else
|
else
|
||||||
changeIcon('bf');
|
changeIcon(PlayState.SONG.player1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function changeIcon(newChar:String):Void
|
public function changeIcon(newChar:String):Void
|
||||||
|
|
|
@ -128,6 +128,8 @@ class MainMenuState extends MusicBeatState
|
||||||
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
|
||||||
add(versionShit);
|
add(versionShit);
|
||||||
|
|
||||||
|
versionShit.text += '(Newgrounds exclusive preview)';
|
||||||
|
|
||||||
// NG.core.calls.event.logEvent('swag').send();
|
// NG.core.calls.event.logEvent('swag').send();
|
||||||
|
|
||||||
super.create();
|
super.create();
|
||||||
|
@ -155,11 +157,14 @@ class MainMenuState extends MusicBeatState
|
||||||
{
|
{
|
||||||
#if linux
|
#if linux
|
||||||
// Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
|
// Sys.command('/usr/bin/xdg-open', ["https://ninja-muffin24.itch.io/funkin", "&"]);
|
||||||
Sys.command('/usr/bin/xdg-open', ["https://www.kickstarter.com/projects/funkin/", "&"]);
|
Sys.command('/usr/bin/xdg-open', [
|
||||||
|
"https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/",
|
||||||
|
"&"
|
||||||
|
]);
|
||||||
#else
|
#else
|
||||||
// FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
// FlxG.openURL('https://ninja-muffin24.itch.io/funkin');
|
||||||
|
|
||||||
FlxG.openURL('https://www.kickstarter.com/projects/funkin/');
|
FlxG.openURL('https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/');
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
|
@ -3,8 +3,6 @@ package;
|
||||||
import Section.SwagSection;
|
import Section.SwagSection;
|
||||||
import Song.SwagSong;
|
import Song.SwagSong;
|
||||||
import WiggleEffect.WiggleEffectType;
|
import WiggleEffect.WiggleEffectType;
|
||||||
import animateAtlasPlayer.assets.AssetManager;
|
|
||||||
import animateAtlasPlayer.core.Animation;
|
|
||||||
import flixel.FlxBasic;
|
import flixel.FlxBasic;
|
||||||
import flixel.FlxCamera;
|
import flixel.FlxCamera;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
|
@ -79,7 +77,6 @@ class PlayState extends MusicBeatState
|
||||||
private var unspawnNotes:Array<Note> = [];
|
private var unspawnNotes:Array<Note> = [];
|
||||||
|
|
||||||
private var strumLine:FlxSprite;
|
private var strumLine:FlxSprite;
|
||||||
private var curSection:Int = 0;
|
|
||||||
|
|
||||||
private var camFollow:FlxObject;
|
private var camFollow:FlxObject;
|
||||||
|
|
||||||
|
@ -539,15 +536,19 @@ class PlayState extends MusicBeatState
|
||||||
tankSky.velocity.x = FlxG.random.float(5, 15);
|
tankSky.velocity.x = FlxG.random.float(5, 15);
|
||||||
add(tankSky);
|
add(tankSky);
|
||||||
|
|
||||||
var tankMountains:BGSprite = new BGSprite('tankMountains', -200, 90, 0.2, 0.2);
|
var tankMountains:BGSprite = new BGSprite('tankMountains', -300, -20, 0.2, 0.2);
|
||||||
tankMountains.setGraphicSize(Std.int(tankMountains.width * 1.1));
|
tankMountains.setGraphicSize(Std.int(tankMountains.width * 1.2));
|
||||||
tankMountains.updateHitbox();
|
tankMountains.updateHitbox();
|
||||||
add(tankMountains);
|
add(tankMountains);
|
||||||
|
|
||||||
var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 200, 0.25, 0.25);
|
var tankBuildings:BGSprite = new BGSprite('tankBuildings', -200, 0, 0.30, 0.30);
|
||||||
|
tankBuildings.setGraphicSize(Std.int(tankBuildings.width * 1.1));
|
||||||
|
tankBuildings.updateHitbox();
|
||||||
add(tankBuildings);
|
add(tankBuildings);
|
||||||
|
|
||||||
var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 0, 0.35, 0.35);
|
var tankRuins:BGSprite = new BGSprite('tankRuins', -200, 0, 0.35, 0.35);
|
||||||
|
tankRuins.setGraphicSize(Std.int(tankRuins.width * 1.1));
|
||||||
|
tankRuins.updateHitbox();
|
||||||
add(tankRuins);
|
add(tankRuins);
|
||||||
|
|
||||||
var smokeLeft:BGSprite = new BGSprite('smokeLeft', -200, -100, 0.4, 0.4, ['SmokeBlurLeft'], true);
|
var smokeLeft:BGSprite = new BGSprite('smokeLeft', -200, -100, 0.4, 0.4, ['SmokeBlurLeft'], true);
|
||||||
|
@ -563,7 +564,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
tankGround = new BGSprite('tankRolling', 300, 300, 0.5, 0.5, ['BG tank w lighting'], true);
|
tankGround = new BGSprite('tankRolling', 300, 300, 0.5, 0.5, ['BG tank w lighting'], true);
|
||||||
add(tankGround);
|
add(tankGround);
|
||||||
tankGround.active = false;
|
// tankGround.active = false;
|
||||||
|
|
||||||
tankmanRun = new FlxTypedGroup<TankmenBG>();
|
tankmanRun = new FlxTypedGroup<TankmenBG>();
|
||||||
add(tankmanRun);
|
add(tankmanRun);
|
||||||
|
@ -587,13 +588,13 @@ class PlayState extends MusicBeatState
|
||||||
var fgTank2:BGSprite = new BGSprite('tank2', 450, 940, 1.5, 1.5, ['foreground']);
|
var fgTank2:BGSprite = new BGSprite('tank2', 450, 940, 1.5, 1.5, ['foreground']);
|
||||||
foregroundSprites.add(fgTank2);
|
foregroundSprites.add(fgTank2);
|
||||||
|
|
||||||
var fgTank4:BGSprite = new BGSprite('tank4', 1200, 1080, 1.5, 1.5, ['fg']);
|
var fgTank4:BGSprite = new BGSprite('tank4', 1300, 900, 1.5, 1.5, ['fg']);
|
||||||
foregroundSprites.add(fgTank4);
|
foregroundSprites.add(fgTank4);
|
||||||
|
|
||||||
var fgTank5:BGSprite = new BGSprite('tank5', 1800, 900, 1.5, 1.5, ['fg']);
|
var fgTank5:BGSprite = new BGSprite('tank5', 1620, 700, 1.5, 1.5, ['fg']);
|
||||||
foregroundSprites.add(fgTank5);
|
foregroundSprites.add(fgTank5);
|
||||||
|
|
||||||
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1400, 3.5, 2.5, ['fg']);
|
var fgTank3:BGSprite = new BGSprite('tank3', 1300, 1200, 3.5, 2.5, ['fg']);
|
||||||
foregroundSprites.add(fgTank3);
|
foregroundSprites.add(fgTank3);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -649,6 +650,11 @@ class PlayState extends MusicBeatState
|
||||||
gf.x -= 50;
|
gf.x -= 50;
|
||||||
gf.y -= 200;
|
gf.y -= 200;
|
||||||
|
|
||||||
|
var tempTankman:TankmenBG = new TankmenBG(20, 500, true);
|
||||||
|
tempTankman.strumTime = 10;
|
||||||
|
tempTankman.resetShit(20, 600, true);
|
||||||
|
tankmanRun.add(tempTankman);
|
||||||
|
|
||||||
for (i in 0...TankmenBG.animationNotes.length)
|
for (i in 0...TankmenBG.animationNotes.length)
|
||||||
{
|
{
|
||||||
if (FlxG.random.bool(16))
|
if (FlxG.random.bool(16))
|
||||||
|
@ -934,8 +940,12 @@ class PlayState extends MusicBeatState
|
||||||
switch (curSong.toLowerCase())
|
switch (curSong.toLowerCase())
|
||||||
{
|
{
|
||||||
// REMOVE THIS LATER
|
// REMOVE THIS LATER
|
||||||
case 'stress':
|
// case 'ugh':
|
||||||
stressIntro();
|
// ughIntro();
|
||||||
|
// case 'stress':
|
||||||
|
// stressIntro();
|
||||||
|
// case 'guns':
|
||||||
|
// gunsIntro();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
startCountdown();
|
startCountdown();
|
||||||
|
@ -1049,8 +1059,7 @@ class PlayState extends MusicBeatState
|
||||||
cameraMovement();
|
cameraMovement();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/* camFollow.setPosition(camPos.x, camPos.y);
|
||||||
camFollow.setPosition(camPos.x, camPos.y);
|
|
||||||
|
|
||||||
camHUD.visible = false;
|
camHUD.visible = false;
|
||||||
|
|
||||||
|
@ -1124,8 +1133,7 @@ class PlayState extends MusicBeatState
|
||||||
cameraMovement();
|
cameraMovement();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/* camHUD.visible = false;
|
||||||
camHUD.visible = false;
|
|
||||||
|
|
||||||
// for story mode shit
|
// for story mode shit
|
||||||
camFollow.setPosition(camPos.x, camPos.y);
|
camFollow.setPosition(camPos.x, camPos.y);
|
||||||
|
@ -1929,7 +1937,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
vocals.pause();
|
vocals.pause();
|
||||||
FlxG.sound.music.play();
|
FlxG.sound.music.play();
|
||||||
Conductor.songPosition = FlxG.sound.music.time;
|
Conductor.songPosition = FlxG.sound.music.time + Conductor.offset;
|
||||||
|
|
||||||
if (vocalsFinished)
|
if (vocalsFinished)
|
||||||
return;
|
return;
|
||||||
|
@ -1966,8 +1974,8 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Conductor.songPosition = FlxG.sound.music.time;
|
Conductor.songPosition = FlxG.sound.music.time + Conductor.offset; // 20 is THE MILLISECONDS??
|
||||||
Conductor.songPosition += FlxG.elapsed * 1000;
|
// Conductor.songPosition += FlxG.elapsed * 1000;
|
||||||
|
|
||||||
if (!paused)
|
if (!paused)
|
||||||
{
|
{
|
||||||
|
@ -2080,11 +2088,21 @@ class PlayState extends MusicBeatState
|
||||||
#if debug
|
#if debug
|
||||||
if (FlxG.keys.justPressed.EIGHT)
|
if (FlxG.keys.justPressed.EIGHT)
|
||||||
{
|
{
|
||||||
|
/* 8 for opponent char
|
||||||
|
SHIFT+8 for player char
|
||||||
|
CTRL+SHIFT+8 for gf */
|
||||||
if (FlxG.keys.pressed.SHIFT)
|
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
|
else
|
||||||
FlxG.switchState(new AnimationDebug(SONG.player2));
|
FlxG.switchState(new AnimationDebug(SONG.player2));
|
||||||
}
|
}
|
||||||
|
if (FlxG.keys.justPressed.PAGEUP)
|
||||||
|
changeSection(1);
|
||||||
|
if (FlxG.keys.justPressed.PAGEDOWN)
|
||||||
|
changeSection(-1);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null)
|
if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null)
|
||||||
|
@ -2153,7 +2171,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
if (health <= 0 && !practiceMode)
|
if (health <= 0 && !practiceMode)
|
||||||
{
|
{
|
||||||
boyfriend.stunned = true;
|
// boyfriend.stunned = true;
|
||||||
|
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
persistentDraw = false;
|
persistentDraw = false;
|
||||||
|
@ -2190,7 +2208,8 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
notes.forEachAlive(function(daNote:Note)
|
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.active = false;
|
||||||
daNote.visible = false;
|
daNote.visible = false;
|
||||||
|
@ -2283,17 +2302,32 @@ class PlayState extends MusicBeatState
|
||||||
// WIP interpolation shit? Need to fix the pause issue
|
// WIP interpolation shit? Need to fix the pause issue
|
||||||
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * SONG.speed));
|
// 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'))
|
// if (PreferencesMenu.getPref('downscroll'))
|
||||||
noteMiss = daNote.y > FlxG.height;
|
// 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;
|
health -= 0.0475;
|
||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
|
killCombo();
|
||||||
}
|
}
|
||||||
|
|
||||||
daNote.active = false;
|
daNote.active = false;
|
||||||
|
@ -2315,6 +2349,38 @@ class PlayState extends MusicBeatState
|
||||||
#end
|
#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
|
function endSong():Void
|
||||||
{
|
{
|
||||||
seenCutscene = false;
|
seenCutscene = false;
|
||||||
|
@ -2412,19 +2478,13 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// gives score and pops up rating
|
||||||
private function popUpScore(strumtime:Float, daNote:Note):Void
|
private function popUpScore(strumtime:Float, daNote:Note):Void
|
||||||
{
|
{
|
||||||
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
||||||
// boyfriend.playAnim('hey');
|
// boyfriend.playAnim('hey');
|
||||||
vocals.volume = 1;
|
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 rating:FlxSprite = new FlxSprite();
|
||||||
var score:Int = 350;
|
var score:Int = 350;
|
||||||
|
|
||||||
|
@ -2471,6 +2531,45 @@ class PlayState extends MusicBeatState
|
||||||
daRating = 'bad';
|
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 pixelShitPart1:String = "";
|
||||||
var pixelShitPart2:String = '';
|
var pixelShitPart2:String = '';
|
||||||
|
|
||||||
|
@ -2480,70 +2579,72 @@ class PlayState extends MusicBeatState
|
||||||
pixelShitPart2 = '-pixel';
|
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));
|
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||||
comboSpr.screenCenter();
|
comboSpr.screenCenter();
|
||||||
comboSpr.x = coolText.x;
|
comboSpr.x = FlxG.width * 0.55;
|
||||||
|
comboSpr.y += 80;
|
||||||
comboSpr.acceleration.y = 600;
|
comboSpr.acceleration.y = 600;
|
||||||
comboSpr.velocity.y -= 150;
|
comboSpr.velocity.y -= 150;
|
||||||
|
|
||||||
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
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));
|
comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7));
|
||||||
rating.antialiasing = true;
|
|
||||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
|
||||||
comboSpr.antialiasing = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rating.setGraphicSize(Std.int(rating.width * daPixelZoom * 0.7));
|
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
||||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * daPixelZoom * 0.7));
|
comboSpr.antialiasing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
comboSpr.updateHitbox();
|
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 seperatedScore:Array<Int> = [];
|
||||||
|
var tempCombo:Int = combo;
|
||||||
|
|
||||||
seperatedScore.push(Math.floor(combo / 100));
|
while (tempCombo != 0)
|
||||||
seperatedScore.push(Math.floor((combo - (seperatedScore[0] * 100)) / 10));
|
{
|
||||||
seperatedScore.push(combo % 10);
|
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)
|
for (i in seperatedScore)
|
||||||
{
|
{
|
||||||
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2));
|
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2));
|
||||||
numScore.screenCenter();
|
numScore.y = comboSpr.y + 80;
|
||||||
numScore.x = coolText.x + (43 * daLoop) - 90;
|
numScore.y = comboSpr.y;
|
||||||
numScore.y += 80;
|
|
||||||
|
|
||||||
if (!curStage.startsWith('school'))
|
if (curStage.startsWith('school'))
|
||||||
|
{
|
||||||
|
numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
numScore.antialiasing = true;
|
numScore.antialiasing = true;
|
||||||
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
|
numScore.setGraphicSize(Std.int(numScore.width * 0.5));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
numScore.setGraphicSize(Std.int(numScore.width * daPixelZoom));
|
|
||||||
}
|
|
||||||
numScore.updateHitbox();
|
numScore.updateHitbox();
|
||||||
|
|
||||||
|
numScore.x = comboSpr.x - (43 * daLoop); //- 90;
|
||||||
numScore.acceleration.y = FlxG.random.int(200, 300);
|
numScore.acceleration.y = FlxG.random.int(200, 300);
|
||||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||||
|
|
||||||
if (combo >= 10 || combo == 0)
|
add(numScore);
|
||||||
add(numScore);
|
|
||||||
|
|
||||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||||
onComplete: function(tween:FlxTween)
|
onComplete: function(tween:FlxTween)
|
||||||
|
@ -2555,30 +2656,6 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
daLoop++;
|
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;
|
var cameraRightSide:Bool = false;
|
||||||
|
@ -2716,7 +2793,7 @@ class PlayState extends MusicBeatState
|
||||||
for (shit in 0...pressArray.length)
|
for (shit in 0...pressArray.length)
|
||||||
{ // if a direction is hit that shouldn't be
|
{ // if a direction is hit that shouldn't be
|
||||||
if (pressArray[shit] && !directionList.contains(shit))
|
if (pressArray[shit] && !directionList.contains(shit))
|
||||||
badNoteHit();
|
noteMiss(shit);
|
||||||
}
|
}
|
||||||
for (coolNote in possibleNotes)
|
for (coolNote in possibleNotes)
|
||||||
{
|
{
|
||||||
|
@ -2726,7 +2803,9 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
badNoteHit();
|
for (shit in 0...pressArray.length)
|
||||||
|
if (pressArray[shit])
|
||||||
|
noteMiss(shit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2758,44 +2837,39 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
function noteMiss(direction:Int = 1):Void
|
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;
|
boyfriend.stunned = false;
|
||||||
if (combo > 5 && gf.animOffsets.exists('sad'))
|
}); */
|
||||||
{
|
|
||||||
gf.playAnim('sad');
|
|
||||||
}
|
|
||||||
combo = 0;
|
|
||||||
|
|
||||||
if (!practiceMode)
|
switch (direction)
|
||||||
songScore -= 10;
|
{
|
||||||
|
case 0:
|
||||||
FlxG.sound.play(Paths.soundRandom('missnote', 1, 3), FlxG.random.float(0.1, 0.2));
|
boyfriend.playAnim('singLEFTmiss', true);
|
||||||
// FlxG.sound.play(Paths.sound('missnote1'), 1, false);
|
case 1:
|
||||||
// FlxG.log.add('played imss note');
|
boyfriend.playAnim('singDOWNmiss', true);
|
||||||
|
case 2:
|
||||||
boyfriend.stunned = true;
|
boyfriend.playAnim('singUPmiss', true);
|
||||||
|
case 3:
|
||||||
// get stunned for 5 seconds
|
boyfriend.playAnim('singRIGHTmiss', true);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* not used anymore lol
|
||||||
|
|
||||||
function badNoteHit()
|
function badNoteHit()
|
||||||
{
|
{
|
||||||
// just double pasting this shit cuz fuk u
|
// just double pasting this shit cuz fuk u
|
||||||
|
@ -2813,7 +2887,7 @@ class PlayState extends MusicBeatState
|
||||||
noteMiss(2);
|
noteMiss(2);
|
||||||
if (rightP)
|
if (rightP)
|
||||||
noteMiss(3);
|
noteMiss(3);
|
||||||
}
|
} */
|
||||||
|
|
||||||
function goodNoteHit(note:Note):Void
|
function goodNoteHit(note:Note):Void
|
||||||
{
|
{
|
||||||
|
@ -2821,8 +2895,8 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
if (!note.isSustainNote)
|
if (!note.isSustainNote)
|
||||||
{
|
{
|
||||||
popUpScore(note.strumTime, note);
|
|
||||||
combo += 1;
|
combo += 1;
|
||||||
|
popUpScore(note.strumTime, note);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.noteData >= 0)
|
if (note.noteData >= 0)
|
||||||
|
@ -2971,8 +3045,8 @@ class PlayState extends MusicBeatState
|
||||||
override function stepHit()
|
override function stepHit()
|
||||||
{
|
{
|
||||||
super.stepHit();
|
super.stepHit();
|
||||||
if (Math.abs(FlxG.sound.music.time - Conductor.songPosition) > 20
|
if (Math.abs(FlxG.sound.music.time - (Conductor.songPosition - Conductor.offset)) > 20
|
||||||
|| (SONG.needsVoices && Math.abs(vocals.time - Conductor.songPosition) > 20))
|
|| (SONG.needsVoices && Math.abs(vocals.time - (Conductor.songPosition - Conductor.offset)) > 20))
|
||||||
{
|
{
|
||||||
resyncVocals();
|
resyncVocals();
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,11 @@ class TankmenBG extends FlxSprite
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
if (x >= FlxG.width * 1.2 || x <= FlxG.width * -0.5)
|
||||||
|
visible = false;
|
||||||
|
else
|
||||||
|
visible = true;
|
||||||
|
|
||||||
if (animation.curAnim.name == 'run')
|
if (animation.curAnim.name == 'run')
|
||||||
{
|
{
|
||||||
var endDirection:Float = (FlxG.width * 0.74) + endingOffset;
|
var endDirection:Float = (FlxG.width * 0.74) + endingOffset;
|
||||||
|
|
|
@ -438,12 +438,15 @@ class TitleState extends MusicBeatState
|
||||||
if (version.trim() != onlineVersion)
|
if (version.trim() != onlineVersion)
|
||||||
{
|
{
|
||||||
trace('OLD VERSION!');
|
trace('OLD VERSION!');
|
||||||
FlxG.switchState(new OutdatedSubState());
|
// FlxG.switchState(new OutdatedSubState());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FlxG.switchState(new MainMenuState());
|
// FlxG.switchState(new MainMenuState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// REDO FOR ITCH/FINAL SHIT
|
||||||
|
FlxG.switchState(new MainMenuState());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue