switch over elseif stuff + few changes
This commit is contained in:
parent
ab6963f6c7
commit
580ad210ca
@ -176,7 +176,7 @@ class PlayState extends MusicBeatState
|
|||||||
private var triggeredAlready:Bool = false;
|
private var triggeredAlready:Bool = false;
|
||||||
|
|
||||||
// Will decide if she's even allowed to headbang at all depending on the song
|
// Will decide if she's even allowed to headbang at all depending on the song
|
||||||
private var allowToHeadbang:Bool = false;
|
private var allowedToHeadbang:Bool = false;
|
||||||
|
|
||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
@ -1187,12 +1187,11 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Song check real quick
|
// Song check real quick
|
||||||
if(curSong == 'Bopeebo' ||
|
switch(curSong)
|
||||||
curSong == 'Philly' ||
|
{
|
||||||
curSong == 'Blammed' ||
|
case 'Bopeebo' | 'Philly' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
|
||||||
curSong == 'Cocoa' ||
|
default: allowedToHeadbang = false;
|
||||||
curSong == 'Eggnog') allowToHeadbang = true;
|
}
|
||||||
else allowToHeadbang = false;
|
|
||||||
|
|
||||||
#if desktop
|
#if desktop
|
||||||
// Updating Discord Rich Presence (with Time Left)
|
// Updating Discord Rich Presence (with Time Left)
|
||||||
@ -1736,93 +1735,96 @@ class PlayState extends MusicBeatState
|
|||||||
if (generatedMusic && PlayState.SONG.notes[Std.int(curStep / 16)] != null)
|
if (generatedMusic && PlayState.SONG.notes[Std.int(curStep / 16)] != null)
|
||||||
{
|
{
|
||||||
// Make sure Girlfriend cheers only for certain songs
|
// Make sure Girlfriend cheers only for certain songs
|
||||||
if(allowToHeadbang)
|
if(allowedToHeadbang)
|
||||||
{
|
{
|
||||||
// Don't animate GF if something else is already animating her (eg. train passing)
|
// 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')
|
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
|
// Per song treatment since some songs will only have the 'Hey' at certain times
|
||||||
if(curSong == 'Philly')
|
switch(curSong)
|
||||||
{
|
{
|
||||||
// Prevent GF from starting too early or doing this endlessly
|
case 'Philly':
|
||||||
if(curBeat < 250)
|
|
||||||
{
|
{
|
||||||
// Stoppage times
|
// General duration of the song
|
||||||
if(curBeat != 184 && curBeat != 216)
|
if(curBeat < 250)
|
||||||
{
|
{
|
||||||
if (curBeat % 16 == 8)
|
// Beats to skip or to stop GF from cheering
|
||||||
|
if(curBeat != 184 && curBeat != 216)
|
||||||
{
|
{
|
||||||
// Just a garantee that it'll trigger just once
|
if(curBeat % 16 == 8)
|
||||||
if(!triggeredAlready)
|
|
||||||
{
|
{
|
||||||
gf.playAnim('cheer');
|
// Just a garantee that it'll trigger just once
|
||||||
trace('Eyy ' + curBeat);
|
if(!triggeredAlready)
|
||||||
triggeredAlready = true;
|
{
|
||||||
}
|
gf.playAnim('cheer');
|
||||||
}else triggeredAlready = false;
|
triggeredAlready = true;
|
||||||
}
|
}
|
||||||
}
|
}else triggeredAlready = false;
|
||||||
}else if(curSong == 'Bopeebo')
|
|
||||||
{
|
|
||||||
if(curBeat > 5 && curBeat < 130)
|
|
||||||
{
|
|
||||||
if (curBeat % 8 == 7)
|
|
||||||
{
|
|
||||||
if(!triggeredAlready)
|
|
||||||
{
|
|
||||||
gf.playAnim('cheer');
|
|
||||||
trace('Eyy ' + curBeat);
|
|
||||||
triggeredAlready = true;
|
|
||||||
}
|
}
|
||||||
}else triggeredAlready = false;
|
}
|
||||||
}
|
}
|
||||||
}else if(curSong == 'Blammed')
|
case 'Bopeebo':
|
||||||
{
|
|
||||||
if(curBeat > 30 && curBeat < 190)
|
|
||||||
{
|
{
|
||||||
if(curBeat < 90 || curBeat > 128)
|
// Where it starts || where it ends
|
||||||
|
if(curBeat > 5 && curBeat < 130)
|
||||||
{
|
{
|
||||||
if (curBeat % 4 == 2)
|
if(curBeat % 8 == 7)
|
||||||
{
|
{
|
||||||
if(!triggeredAlready)
|
if(!triggeredAlready)
|
||||||
{
|
{
|
||||||
gf.playAnim('cheer');
|
gf.playAnim('cheer');
|
||||||
trace('Eyy ' + curBeat);
|
|
||||||
triggeredAlready = true;
|
triggeredAlready = true;
|
||||||
}
|
}
|
||||||
}else triggeredAlready = false;
|
}else triggeredAlready = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(curSong == 'Cocoa')
|
case 'Blammed':
|
||||||
{
|
|
||||||
if(curBeat < 170)
|
|
||||||
{
|
{
|
||||||
if(curBeat < 65 || curBeat > 130 && curBeat < 145)
|
if(curBeat > 30 && curBeat < 190)
|
||||||
{
|
{
|
||||||
if (curBeat % 16 == 15)
|
if(curBeat < 90 || curBeat > 128)
|
||||||
{
|
{
|
||||||
if(!triggeredAlready)
|
if(curBeat % 4 == 2)
|
||||||
{
|
{
|
||||||
gf.playAnim('cheer');
|
if(!triggeredAlready)
|
||||||
trace('Eyy ' + curBeat);
|
{
|
||||||
triggeredAlready = true;
|
gf.playAnim('cheer');
|
||||||
}
|
triggeredAlready = true;
|
||||||
}else triggeredAlready = false;
|
}
|
||||||
}
|
}else triggeredAlready = false;
|
||||||
}
|
|
||||||
}else if(curSong == 'Eggnog')
|
|
||||||
{
|
|
||||||
if(curBeat > 10 && curBeat != 111 && curBeat < 220)
|
|
||||||
{
|
|
||||||
if (curBeat % 8 == 7)
|
|
||||||
{
|
|
||||||
if(!triggeredAlready)
|
|
||||||
{
|
|
||||||
gf.playAnim('cheer');
|
|
||||||
trace('Eyy ' + curBeat);
|
|
||||||
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user