Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
commit
5aad3d7818
@ -160,7 +160,6 @@ class PlayState extends MusicBeatState
|
||||
var scoreTxt:FlxText;
|
||||
var replayTxt:FlxText;
|
||||
|
||||
|
||||
public static var campaignScore:Int = 0;
|
||||
|
||||
var defaultCamZoom:Float = 1.05;
|
||||
@ -176,6 +175,12 @@ class PlayState extends MusicBeatState
|
||||
public static var timeCurrently:Float = 0;
|
||||
public static var timeCurrentlyR:Float = 0;
|
||||
|
||||
// Will fire once to prevent debug spam messages and broken animations
|
||||
private var triggeredAlready:Bool = false;
|
||||
|
||||
// Will decide if she's even allowed to headbang at all depending on the song
|
||||
private var allowedToHeadbang:Bool = false;
|
||||
|
||||
override public function create()
|
||||
{
|
||||
|
||||
@ -1180,11 +1185,15 @@ class PlayState extends MusicBeatState
|
||||
songName.cameras = [camHUD];
|
||||
}
|
||||
|
||||
// Song check real quick
|
||||
switch(curSong)
|
||||
{
|
||||
case 'Bopeebo' | 'Philly' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
||||
default: allowedToHeadbang = false;
|
||||
}
|
||||
|
||||
#if desktop
|
||||
// Updating Discord Rich Presence (with Time Left)
|
||||
|
||||
|
||||
|
||||
DiscordClient.changePresence(detailsText + " " + SONG.song + " (" + storyDifficultyText + ") " + generateRanking(), "\nAcc: " + truncateFloat(accuracy, 2) + "% | Score: " + songScore + " | Misses: " + misses , iconRPC);
|
||||
#end
|
||||
}
|
||||
@ -1724,9 +1733,100 @@ class PlayState extends MusicBeatState
|
||||
|
||||
if (generatedMusic && PlayState.SONG.notes[Std.int(curStep / 16)] != null)
|
||||
{
|
||||
if (curBeat % 4 == 0)
|
||||
// Make sure Girlfriend cheers only for certain songs
|
||||
if(allowedToHeadbang)
|
||||
{
|
||||
// trace(PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection);
|
||||
// Don't animate GF if something else is already animating her (eg. train passing)
|
||||
if(gf.animation.curAnim.name == 'danceLeft' || gf.animation.curAnim.name == 'danceRight' || gf.animation.curAnim.name == 'idle')
|
||||
{
|
||||
// Per song treatment since some songs will only have the 'Hey' at certain times
|
||||
switch(curSong)
|
||||
{
|
||||
case 'Philly':
|
||||
{
|
||||
// General duration of the song
|
||||
if(curBeat < 250)
|
||||
{
|
||||
// Beats to skip or to stop GF from cheering
|
||||
if(curBeat != 184 && curBeat != 216)
|
||||
{
|
||||
if(curBeat % 16 == 8)
|
||||
{
|
||||
// Just a garantee that it'll trigger just once
|
||||
if(!triggeredAlready)
|
||||
{
|
||||
gf.playAnim('cheer');
|
||||
triggeredAlready = true;
|
||||
}
|
||||
}else triggeredAlready = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'Bopeebo':
|
||||
{
|
||||
// Where it starts || where it ends
|
||||
if(curBeat > 5 && curBeat < 130)
|
||||
{
|
||||
if(curBeat % 8 == 7)
|
||||
{
|
||||
if(!triggeredAlready)
|
||||
{
|
||||
gf.playAnim('cheer');
|
||||
triggeredAlready = true;
|
||||
}
|
||||
}else triggeredAlready = false;
|
||||
}
|
||||
}
|
||||
case 'Blammed':
|
||||
{
|
||||
if(curBeat > 30 && curBeat < 190)
|
||||
{
|
||||
if(curBeat < 90 || curBeat > 128)
|
||||
{
|
||||
if(curBeat % 4 == 2)
|
||||
{
|
||||
if(!triggeredAlready)
|
||||
{
|
||||
gf.playAnim('cheer');
|
||||
triggeredAlready = true;
|
||||
}
|
||||
}else triggeredAlready = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'Cocoa':
|
||||
{
|
||||
if(curBeat < 170)
|
||||
{
|
||||
if(curBeat < 65 || curBeat > 130 && curBeat < 145)
|
||||
{
|
||||
if(curBeat % 16 == 15)
|
||||
{
|
||||
if(!triggeredAlready)
|
||||
{
|
||||
gf.playAnim('cheer');
|
||||
triggeredAlready = true;
|
||||
}
|
||||
}else triggeredAlready = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'Eggnog':
|
||||
{
|
||||
if(curBeat > 10 && curBeat != 111 && curBeat < 220)
|
||||
{
|
||||
if(curBeat % 8 == 7)
|
||||
{
|
||||
if(!triggeredAlready)
|
||||
{
|
||||
gf.playAnim('cheer');
|
||||
triggeredAlready = true;
|
||||
}
|
||||
}else triggeredAlready = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (camFollow.x != dad.getMidpoint().x + 150 && !PlayState.SONG.notes[Std.int(curStep / 16)].mustHitSection)
|
||||
|
Loading…
x
Reference in New Issue
Block a user