Merge branch 'nitpix' of github.com:ninjamuffin99/Funkin-secret into testtrack

This commit is contained in:
MtH 2021-03-30 05:45:15 +02:00
commit b82fdc257f
12 changed files with 277 additions and 382 deletions

Binary file not shown.

Binary file not shown.

View File

@ -13,6 +13,7 @@ class BackgroundDancer extends FlxSprite
animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
animation.play('danceLeft'); animation.play('danceLeft');
animation.finish();
antialiasing = true; antialiasing = true;
} }

View File

@ -16,6 +16,7 @@ class BackgroundGirls extends FlxSprite
animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false); animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false);
animation.play('danceLeft'); animation.play('danceLeft');
animation.finish();
} }
var danceDir:Bool = false; var danceDir:Bool = false;
@ -25,6 +26,7 @@ class BackgroundGirls extends FlxSprite
animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false); animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false); animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false);
dance(); dance();
animation.finish();
} }
public function dance():Void public function dance():Void

View File

@ -38,17 +38,17 @@ class Character extends FlxSprite
// GIRLFRIEND CODE // GIRLFRIEND CODE
tex = Paths.getSparrowAtlas('characters/GF_assets'); tex = Paths.getSparrowAtlas('characters/GF_assets');
frames = tex; frames = tex;
animation.addByPrefix('cheer', 'GF Cheer', 24, false); quickAnimAdd('cheer', 'GF Cheer');
animation.addByPrefix('singLEFT', 'GF left note', 24, false); quickAnimAdd('singLEFT', 'GF left note');
animation.addByPrefix('singRIGHT', 'GF Right Note', 24, false); quickAnimAdd('singRIGHT', 'GF Right Note');
animation.addByPrefix('singUP', 'GF Up Note', 24, false); quickAnimAdd('singUP', 'GF Up Note');
animation.addByPrefix('singDOWN', 'GF Down Note', 24, false); quickAnimAdd('singDOWN', 'GF Down Note');
animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false); animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false);
animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24); animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24);
animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false); animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false);
animation.addByPrefix('scared', 'GF FEAR', 24); animation.addByPrefix('scared', 'GF FEAR', 24, true);
loadOffsetFile(curCharacter); loadOffsetFile(curCharacter);
@ -57,17 +57,17 @@ class Character extends FlxSprite
case 'gf-christmas': case 'gf-christmas':
tex = Paths.getSparrowAtlas('christmas/gfChristmas'); tex = Paths.getSparrowAtlas('christmas/gfChristmas');
frames = tex; frames = tex;
animation.addByPrefix('cheer', 'GF Cheer', 24, false); quickAnimAdd('cheer', 'GF Cheer');
animation.addByPrefix('singLEFT', 'GF left note', 24, false); quickAnimAdd('singLEFT', 'GF left note');
animation.addByPrefix('singRIGHT', 'GF Right Note', 24, false); quickAnimAdd('singRIGHT', 'GF Right Note');
animation.addByPrefix('singUP', 'GF Up Note', 24, false); quickAnimAdd('singUP', 'GF Up Note');
animation.addByPrefix('singDOWN', 'GF Down Note', 24, false); quickAnimAdd('singDOWN', 'GF Down Note');
animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false); animation.addByIndices('sad', 'gf sad', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "", 24, false);
animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceLeft', 'GF Dancing Beat', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.addByIndices('danceRight', 'GF Dancing Beat', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false);
animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24); animation.addByIndices('hairBlow', "GF Dancing Beat Hair blowing", [0, 1, 2, 3], "", 24);
animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false); animation.addByIndices('hairFall', "GF Dancing Beat Hair Landing", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "", 24, false);
animation.addByPrefix('scared', 'GF FEAR', 24); animation.addByPrefix('scared', 'GF FEAR', 24, true);
addOffset('cheer'); addOffset('cheer');
addOffset('sad', -2, -21); addOffset('sad', -2, -21);
@ -112,9 +112,11 @@ class Character extends FlxSprite
animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24,
false); false);
animation.addByIndices('idleHair', 'GF Dancing Beat Hair blowing CAR', [10, 11, 12, 25, 26, 27], "", 24, true);
addOffset('danceLeft', 0); addOffset('danceLeft', 0);
addOffset('danceRight', 0); addOffset('danceRight', 0);
addOffset('idleHair', 0);
playAnim('danceRight'); playAnim('danceRight');
@ -138,11 +140,11 @@ class Character extends FlxSprite
// DAD ANIMATION LOADING CODE // DAD ANIMATION LOADING CODE
tex = Paths.getSparrowAtlas('DADDY_DEAREST'); tex = Paths.getSparrowAtlas('DADDY_DEAREST');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'Dad idle dance', 24); quickAnimAdd('idle', 'Dad idle dance');
animation.addByPrefix('singUP', 'Dad Sing Note UP', 24); quickAnimAdd('singUP', 'Dad Sing Note UP');
animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24); quickAnimAdd('singRIGHT', 'Dad Sing Note RIGHT');
animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24); quickAnimAdd('singDOWN', 'Dad Sing Note DOWN');
animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24); quickAnimAdd('singLEFT', 'Dad Sing Note LEFT');
addOffset('idle'); addOffset('idle');
addOffset("singUP", -6, 50); addOffset("singUP", -6, 50);
@ -154,10 +156,10 @@ class Character extends FlxSprite
case 'spooky': case 'spooky':
tex = Paths.getSparrowAtlas('spooky_kids_assets'); tex = Paths.getSparrowAtlas('spooky_kids_assets');
frames = tex; frames = tex;
animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); quickAnimAdd('singUP', 'spooky UP NOTE');
animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); quickAnimAdd('singDOWN', 'spooky DOWN note');
animation.addByPrefix('singLEFT', 'note sing left', 24, false); quickAnimAdd('singLEFT', 'note sing left');
animation.addByPrefix('singRIGHT', 'spooky sing right', 24, false); quickAnimAdd('singRIGHT', 'spooky sing right');
animation.addByIndices('danceLeft', 'spooky dance idle', [0, 2, 6], "", 12, false); animation.addByIndices('danceLeft', 'spooky dance idle', [0, 2, 6], "", 12, false);
animation.addByIndices('danceRight', 'spooky dance idle', [8, 10, 12, 14], "", 12, false); animation.addByIndices('danceRight', 'spooky dance idle', [8, 10, 12, 14], "", 12, false);
@ -174,13 +176,13 @@ class Character extends FlxSprite
tex = Paths.getSparrowAtlas('Mom_Assets'); tex = Paths.getSparrowAtlas('Mom_Assets');
frames = tex; frames = tex;
animation.addByPrefix('idle', "Mom Idle", 24, false); quickAnimAdd('idle', "Mom Idle");
animation.addByPrefix('singUP', "Mom Up Pose", 24, false); quickAnimAdd('singUP', "Mom Up Pose");
animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); quickAnimAdd('singDOWN', "MOM DOWN POSE");
animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); quickAnimAdd('singLEFT', 'Mom Left Pose');
// ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT
// CUZ DAVE IS DUMB! // CUZ DAVE IS DUMB!
animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); quickAnimAdd('singRIGHT', 'Mom Pose Left');
addOffset('idle'); addOffset('idle');
addOffset("singUP", 14, 71); addOffset("singUP", 14, 71);
@ -194,29 +196,31 @@ class Character extends FlxSprite
tex = Paths.getSparrowAtlas('momCar'); tex = Paths.getSparrowAtlas('momCar');
frames = tex; frames = tex;
animation.addByPrefix('idle', "Mom Idle", 24, false); quickAnimAdd('idle', "Mom Idle");
animation.addByPrefix('singUP', "Mom Up Pose", 24, false); quickAnimAdd('singUP', "Mom Up Pose");
animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false); quickAnimAdd('singDOWN', "MOM DOWN POSE");
animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false); quickAnimAdd('singLEFT', 'Mom Left Pose');
// ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT
// CUZ DAVE IS DUMB! // CUZ DAVE IS DUMB!
animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false); quickAnimAdd('singRIGHT', 'Mom Pose Left');
animation.addByIndices('idleHair', "Mom Idle", [10, 11, 12, 13], "", 24, true);
addOffset('idle'); addOffset('idle');
addOffset("singUP", 14, 71); addOffset("singUP", 14, 71);
addOffset("singRIGHT", 10, -60); addOffset("singRIGHT", 10, -60);
addOffset("singLEFT", 250, -23); addOffset("singLEFT", 250, -23);
addOffset("singDOWN", 20, -160); addOffset("singDOWN", 20, -160);
addOffset('idleHair');
playAnim('idle'); playAnim('idle');
case 'monster': case 'monster':
tex = Paths.getSparrowAtlas('Monster_Assets'); tex = Paths.getSparrowAtlas('Monster_Assets');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'monster idle', 24, false); quickAnimAdd('idle', 'monster idle');
animation.addByPrefix('singUP', 'monster up note', 24, false); quickAnimAdd('singUP', 'monster up note');
animation.addByPrefix('singDOWN', 'monster down', 24, false); quickAnimAdd('singDOWN', 'monster down');
animation.addByPrefix('singLEFT', 'Monster left note', 24, false); quickAnimAdd('singLEFT', 'Monster left note');
animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); quickAnimAdd('singRIGHT', 'Monster Right note');
addOffset('idle'); addOffset('idle');
addOffset("singUP", -20, 94); addOffset("singUP", -20, 94);
@ -227,11 +231,11 @@ class Character extends FlxSprite
case 'monster-christmas': case 'monster-christmas':
tex = Paths.getSparrowAtlas('christmas/monsterChristmas'); tex = Paths.getSparrowAtlas('christmas/monsterChristmas');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'monster idle', 24, false); quickAnimAdd('idle', 'monster idle');
animation.addByPrefix('singUP', 'monster up note', 24, false); quickAnimAdd('singUP', 'monster up note');
animation.addByPrefix('singDOWN', 'monster down', 24, false); quickAnimAdd('singDOWN', 'monster down');
animation.addByPrefix('singLEFT', 'Monster left note', 24, false); quickAnimAdd('singLEFT', 'Monster left note');
animation.addByPrefix('singRIGHT', 'Monster Right note', 24, false); quickAnimAdd('singRIGHT', 'Monster Right note');
addOffset('idle'); addOffset('idle');
addOffset("singUP", -20, 50); addOffset("singUP", -20, 50);
@ -242,27 +246,27 @@ class Character extends FlxSprite
case 'pico': case 'pico':
tex = Paths.getSparrowAtlas('Pico_FNF_assetss'); tex = Paths.getSparrowAtlas('Pico_FNF_assetss');
frames = tex; frames = tex;
animation.addByPrefix('idle', "Pico Idle Dance", 24); quickAnimAdd('idle', "Pico Idle Dance");
animation.addByPrefix('singUP', 'pico Up note0', 24, false); quickAnimAdd('singUP', 'pico Up note0');
animation.addByPrefix('singDOWN', 'Pico Down Note0', 24, false); quickAnimAdd('singDOWN', 'Pico Down Note0');
if (isPlayer) if (isPlayer)
{ {
animation.addByPrefix('singLEFT', 'Pico NOTE LEFT0', 24, false); quickAnimAdd('singLEFT', 'Pico NOTE LEFT0');
animation.addByPrefix('singRIGHT', 'Pico Note Right0', 24, false); quickAnimAdd('singRIGHT', 'Pico Note Right0');
animation.addByPrefix('singRIGHTmiss', 'Pico Note Right Miss', 24, false); quickAnimAdd('singRIGHTmiss', 'Pico Note Right Miss');
animation.addByPrefix('singLEFTmiss', 'Pico NOTE LEFT miss', 24, false); quickAnimAdd('singLEFTmiss', 'Pico NOTE LEFT miss');
} }
else else
{ {
// Need to be flipped! REDO THIS LATER! // Need to be flipped! REDO THIS LATER!
animation.addByPrefix('singLEFT', 'Pico Note Right0', 24, false); quickAnimAdd('singLEFT', 'Pico Note Right0');
animation.addByPrefix('singRIGHT', 'Pico NOTE LEFT0', 24, false); quickAnimAdd('singRIGHT', 'Pico NOTE LEFT0');
animation.addByPrefix('singRIGHTmiss', 'Pico NOTE LEFT miss', 24, false); quickAnimAdd('singRIGHTmiss', 'Pico NOTE LEFT miss');
animation.addByPrefix('singLEFTmiss', 'Pico Note Right Miss', 24, false); quickAnimAdd('singLEFTmiss', 'Pico Note Right Miss');
} }
animation.addByPrefix('singUPmiss', 'pico Up note miss', 24); quickAnimAdd('singUPmiss', 'pico Up note miss');
animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24); quickAnimAdd('singDOWNmiss', 'Pico Down Note MISS');
addOffset('idle'); addOffset('idle');
addOffset("singUP", -29, 27); addOffset("singUP", -29, 27);
@ -295,22 +299,22 @@ class Character extends FlxSprite
case 'bf': case 'bf':
var tex = Paths.getSparrowAtlas('characters/BOYFRIEND'); var tex = Paths.getSparrowAtlas('characters/BOYFRIEND');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'BF idle dance', 24, false); quickAnimAdd('idle', 'BF idle dance');
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); quickAnimAdd('singUP', 'BF NOTE UP0');
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); quickAnimAdd('singLEFT', 'BF NOTE LEFT0');
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0');
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); quickAnimAdd('singDOWN', 'BF NOTE DOWN0');
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); quickAnimAdd('singUPmiss', 'BF NOTE UP MISS');
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS');
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS');
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS');
animation.addByPrefix('hey', 'BF HEY', 24, false); quickAnimAdd('hey', 'BF HEY');
animation.addByPrefix('firstDeath', "BF dies", 24, false); quickAnimAdd('firstDeath', "BF dies");
animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true); animation.addByPrefix('deathLoop', "BF Dead Loop", 24, true);
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false); quickAnimAdd('deathConfirm', "BF Dead confirm");
animation.addByPrefix('scared', 'BF idle shaking', 24); animation.addByPrefix('scared', 'BF idle shaking', 24, true);
loadOffsetFile(curCharacter); loadOffsetFile(curCharacter);
@ -323,16 +327,16 @@ class Character extends FlxSprite
case 'bf-christmas': case 'bf-christmas':
var tex = Paths.getSparrowAtlas('christmas/bfChristmas'); var tex = Paths.getSparrowAtlas('christmas/bfChristmas');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'BF idle dance', 24, false); quickAnimAdd('idle', 'BF idle dance');
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); quickAnimAdd('singUP', 'BF NOTE UP0');
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); quickAnimAdd('singLEFT', 'BF NOTE LEFT0');
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0');
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); quickAnimAdd('singDOWN', 'BF NOTE DOWN0');
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); quickAnimAdd('singUPmiss', 'BF NOTE UP MISS');
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS');
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS');
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS');
animation.addByPrefix('hey', 'BF HEY', 24, false); quickAnimAdd('hey', 'BF HEY');
addOffset('idle', -5); addOffset('idle', -5);
addOffset("singUP", -29, 27); addOffset("singUP", -29, 27);
@ -351,15 +355,16 @@ class Character extends FlxSprite
case 'bf-car': case 'bf-car':
var tex = Paths.getSparrowAtlas('bfCar'); var tex = Paths.getSparrowAtlas('bfCar');
frames = tex; frames = tex;
animation.addByPrefix('idle', 'BF idle dance', 24, false); quickAnimAdd('idle', 'BF idle dance');
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); quickAnimAdd('singUP', 'BF NOTE UP0');
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false); quickAnimAdd('singLEFT', 'BF NOTE LEFT0');
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false); quickAnimAdd('singRIGHT', 'BF NOTE RIGHT0');
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false); quickAnimAdd('singDOWN', 'BF NOTE DOWN0');
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false); quickAnimAdd('singUPmiss', 'BF NOTE UP MISS');
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false); quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS');
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS');
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false); quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS');
animation.addByIndices('idleHair', 'BF idle dance', [10, 11, 12, 13], "", 24, true);
addOffset('idle', -5); addOffset('idle', -5);
addOffset("singUP", -29, 27); addOffset("singUP", -29, 27);
@ -370,20 +375,21 @@ class Character extends FlxSprite
addOffset("singRIGHTmiss", -30, 21); addOffset("singRIGHTmiss", -30, 21);
addOffset("singLEFTmiss", 12, 24); addOffset("singLEFTmiss", 12, 24);
addOffset("singDOWNmiss", -11, -19); addOffset("singDOWNmiss", -11, -19);
addOffset('idleHair', -5);
playAnim('idle'); playAnim('idle');
flipX = true; flipX = true;
case 'bf-pixel': case 'bf-pixel':
frames = Paths.getSparrowAtlas('weeb/bfPixel'); frames = Paths.getSparrowAtlas('weeb/bfPixel');
animation.addByPrefix('idle', 'BF IDLE', 24, false); quickAnimAdd('idle', 'BF IDLE');
animation.addByPrefix('singUP', 'BF UP NOTE', 24, false); quickAnimAdd('singUP', 'BF UP NOTE');
animation.addByPrefix('singLEFT', 'BF LEFT NOTE', 24, false); quickAnimAdd('singLEFT', 'BF LEFT NOTE');
animation.addByPrefix('singRIGHT', 'BF RIGHT NOTE', 24, false); quickAnimAdd('singRIGHT', 'BF RIGHT NOTE');
animation.addByPrefix('singDOWN', 'BF DOWN NOTE', 24, false); quickAnimAdd('singDOWN', 'BF DOWN NOTE');
animation.addByPrefix('singUPmiss', 'BF UP MISS', 24, false); quickAnimAdd('singUPmiss', 'BF UP MISS');
animation.addByPrefix('singLEFTmiss', 'BF LEFT MISS', 24, false); quickAnimAdd('singLEFTmiss', 'BF LEFT MISS');
animation.addByPrefix('singRIGHTmiss', 'BF RIGHT MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'BF RIGHT MISS');
animation.addByPrefix('singDOWNmiss', 'BF DOWN MISS', 24, false); quickAnimAdd('singDOWNmiss', 'BF DOWN MISS');
addOffset('idle'); addOffset('idle');
addOffset("singUP"); addOffset("singUP");
@ -408,10 +414,10 @@ class Character extends FlxSprite
flipX = true; flipX = true;
case 'bf-pixel-dead': case 'bf-pixel-dead':
frames = Paths.getSparrowAtlas('weeb/bfPixelsDEAD'); frames = Paths.getSparrowAtlas('weeb/bfPixelsDEAD');
animation.addByPrefix('singUP', "BF Dies pixel", 24, false); quickAnimAdd('singUP', "BF Dies pixel");
animation.addByPrefix('firstDeath', "BF Dies pixel", 24, false); quickAnimAdd('firstDeath', "BF Dies pixel");
animation.addByPrefix('deathLoop', "Retry Loop", 24, true); animation.addByPrefix('deathLoop', "Retry Loop", 24, true);
animation.addByPrefix('deathConfirm', "RETRY CONFIRM", 24, false); quickAnimAdd('deathConfirm', "RETRY CONFIRM");
animation.play('firstDeath'); animation.play('firstDeath');
addOffset('firstDeath'); addOffset('firstDeath');
@ -426,11 +432,16 @@ class Character extends FlxSprite
case 'senpai': case 'senpai':
frames = Paths.getSparrowAtlas('weeb/senpai'); frames = Paths.getSparrowAtlas('weeb/senpai');
animation.addByPrefix('idle', 'Senpai Idle', 24, false); quickAnimAdd('idle', 'Senpai Idle');
animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false); // at framerate 16.8 animation plays over 2 beats at 144bpm,
animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false); // but if the game lags or the bpm is > 144 (mods etc.)
animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false); // he may miss his next dance
animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false); // animation.getByName('idle').frameRate = 16.8;
quickAnimAdd('singUP', 'SENPAI UP NOTE');
quickAnimAdd('singLEFT', 'SENPAI LEFT NOTE');
quickAnimAdd('singRIGHT', 'SENPAI RIGHT NOTE');
quickAnimAdd('singDOWN', 'SENPAI DOWN NOTE');
addOffset('idle'); addOffset('idle');
addOffset("singUP", 5, 37); addOffset("singUP", 5, 37);
@ -446,11 +457,11 @@ class Character extends FlxSprite
antialiasing = false; antialiasing = false;
case 'senpai-angry': case 'senpai-angry':
frames = Paths.getSparrowAtlas('weeb/senpai'); frames = Paths.getSparrowAtlas('weeb/senpai');
animation.addByPrefix('idle', 'Angry Senpai Idle', 24, false); quickAnimAdd('idle', 'Angry Senpai Idle');
animation.addByPrefix('singUP', 'Angry Senpai UP NOTE', 24, false); quickAnimAdd('singUP', 'Angry Senpai UP NOTE');
animation.addByPrefix('singLEFT', 'Angry Senpai LEFT NOTE', 24, false); quickAnimAdd('singLEFT', 'Angry Senpai LEFT NOTE');
animation.addByPrefix('singRIGHT', 'Angry Senpai RIGHT NOTE', 24, false); quickAnimAdd('singRIGHT', 'Angry Senpai RIGHT NOTE');
animation.addByPrefix('singDOWN', 'Angry Senpai DOWN NOTE', 24, false); quickAnimAdd('singDOWN', 'Angry Senpai DOWN NOTE');
addOffset('idle'); addOffset('idle');
addOffset("singUP", 5, 37); addOffset("singUP", 5, 37);
@ -466,11 +477,11 @@ class Character extends FlxSprite
case 'spirit': case 'spirit':
frames = Paths.getPackerAtlas('weeb/spirit'); frames = Paths.getPackerAtlas('weeb/spirit');
animation.addByPrefix('idle', "idle spirit_", 24, false); quickAnimAdd('idle', "idle spirit_");
animation.addByPrefix('singUP', "up_", 24, false); quickAnimAdd('singUP', "up_");
animation.addByPrefix('singRIGHT', "right_", 24, false); quickAnimAdd('singRIGHT', "right_");
animation.addByPrefix('singLEFT', "left_", 24, false); quickAnimAdd('singLEFT', "left_");
animation.addByPrefix('singDOWN', "spirit down_", 24, false); quickAnimAdd('singDOWN', "spirit down_");
addOffset('idle', -220, -280); addOffset('idle', -220, -280);
addOffset('singUP', -220, -240); addOffset('singUP', -220, -240);
@ -487,17 +498,17 @@ class Character extends FlxSprite
case 'parents-christmas': case 'parents-christmas':
frames = Paths.getSparrowAtlas('christmas/mom_dad_christmas_assets'); frames = Paths.getSparrowAtlas('christmas/mom_dad_christmas_assets');
animation.addByPrefix('idle', 'Parent Christmas Idle', 24, false); quickAnimAdd('idle', 'Parent Christmas Idle');
animation.addByPrefix('singUP', 'Parent Up Note Dad', 24, false); quickAnimAdd('singUP', 'Parent Up Note Dad');
animation.addByPrefix('singDOWN', 'Parent Down Note Dad', 24, false); quickAnimAdd('singDOWN', 'Parent Down Note Dad');
animation.addByPrefix('singLEFT', 'Parent Left Note Dad', 24, false); quickAnimAdd('singLEFT', 'Parent Left Note Dad');
animation.addByPrefix('singRIGHT', 'Parent Right Note Dad', 24, false); quickAnimAdd('singRIGHT', 'Parent Right Note Dad');
animation.addByPrefix('singUP-alt', 'Parent Up Note Mom', 24, false); quickAnimAdd('singUP-alt', 'Parent Up Note Mom');
animation.addByPrefix('singDOWN-alt', 'Parent Down Note Mom', 24, false); quickAnimAdd('singDOWN-alt', 'Parent Down Note Mom');
animation.addByPrefix('singLEFT-alt', 'Parent Left Note Mom', 24, false); quickAnimAdd('singLEFT-alt', 'Parent Left Note Mom');
animation.addByPrefix('singRIGHT-alt', 'Parent Right Note Mom', 24, false); quickAnimAdd('singRIGHT-alt', 'Parent Right Note Mom');
addOffset('idle'); addOffset('idle');
addOffset("singUP", -47, 24); addOffset("singUP", -47, 24);
@ -513,28 +524,28 @@ class Character extends FlxSprite
case 'tankman': case 'tankman':
frames = Paths.getSparrowAtlas('characters/tankmanCaptain'); frames = Paths.getSparrowAtlas('characters/tankmanCaptain');
animation.addByPrefix('idle', "Tankman Idle Dance", 24, false); quickAnimAdd('idle', "Tankman Idle Dance");
if (isPlayer) if (isPlayer)
{ {
animation.addByPrefix('singLEFT', 'Tankman Note Left0', 24, false); quickAnimAdd('singLEFT', 'Tankman Note Left0');
animation.addByPrefix('singRIGHT', 'Tankman Right Note0', 24, false); quickAnimAdd('singRIGHT', 'Tankman Right Note0');
animation.addByPrefix('singLEFTmiss', 'Tankman Note Left MISS', 24, false); quickAnimAdd('singLEFTmiss', 'Tankman Note Left MISS');
animation.addByPrefix('singRIGHTmiss', 'Tankman Right Note MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'Tankman Right Note MISS');
} }
else else
{ {
// Need to be flipped! REDO THIS LATER // Need to be flipped! REDO THIS LATER
animation.addByPrefix('singLEFT', 'Tankman Right Note0', 24, false); quickAnimAdd('singLEFT', 'Tankman Right Note0');
animation.addByPrefix('singRIGHT', 'Tankman Note Left0', 24, false); quickAnimAdd('singRIGHT', 'Tankman Note Left0');
animation.addByPrefix('singLEFTmiss', 'Tankman Right Note MISS', 24, false); quickAnimAdd('singLEFTmiss', 'Tankman Right Note MISS');
animation.addByPrefix('singRIGHTmiss', 'Tankman Note Left MISS', 24, false); quickAnimAdd('singRIGHTmiss', 'Tankman Note Left MISS');
} }
animation.addByPrefix('singUP', 'Tankman UP note0', 24, false); quickAnimAdd('singUP', 'Tankman UP note0');
animation.addByPrefix('singDOWN', 'Tankman DOWN note0', 24, false); quickAnimAdd('singDOWN', 'Tankman DOWN note0');
animation.addByPrefix('singUPmiss', 'Tankman UP note MISS', 24, false); quickAnimAdd('singUPmiss', 'Tankman UP note MISS');
animation.addByPrefix('singDOWNmiss', 'Tankman DOWN note MISS', 24, false); quickAnimAdd('singDOWNmiss', 'Tankman DOWN note MISS');
loadOffsetFile(curCharacter); loadOffsetFile(curCharacter);
@ -544,6 +555,7 @@ class Character extends FlxSprite
} }
dance(); dance();
animation.finish();
if (isPlayer) if (isPlayer)
{ {
@ -621,6 +633,13 @@ class Character extends FlxSprite
} }
} }
if (curCharacter.endsWith('-car'))
{
// looping hair anims after idle finished
if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished)
playAnim('idleHair');
}
switch (curCharacter) switch (curCharacter)
{ {
case 'gf': case 'gf':
@ -661,7 +680,7 @@ class Character extends FlxSprite
{ {
switch (curCharacter) switch (curCharacter)
{ {
case 'gf': case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel':
if (!animation.curAnim.name.startsWith('hair')) if (!animation.curAnim.name.startsWith('hair'))
{ {
danced = !danced; danced = !danced;
@ -672,37 +691,6 @@ class Character extends FlxSprite
playAnim('danceLeft'); playAnim('danceLeft');
} }
case 'gf-christmas':
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;
if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
}
case 'gf-car':
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;
if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
}
case 'gf-pixel':
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;
if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
}
case 'pico-speaker': case 'pico-speaker':
// lol weed // lol weed
// playAnim('shoot' + FlxG.random.int(1, 4), true); // playAnim('shoot' + FlxG.random.int(1, 4), true);

View File

@ -28,8 +28,6 @@ import haxe.Json;
import lime.utils.Assets; import lime.utils.Assets;
import openfl.events.Event; import openfl.events.Event;
import openfl.events.IOErrorEvent; import openfl.events.IOErrorEvent;
import openfl.events.IOErrorEvent;
import openfl.events.IOErrorEvent;
import openfl.media.Sound; import openfl.media.Sound;
import openfl.net.FileReference; import openfl.net.FileReference;
import openfl.utils.ByteArray; import openfl.utils.ByteArray;
@ -76,7 +74,7 @@ class ChartingState extends MusicBeatState
**/ **/
var curSelectedNote:Array<Dynamic>; var curSelectedNote:Array<Dynamic>;
var tempBpm:Int = 0; var tempBpm:Float = 0;
var vocals:FlxSound; var vocals:FlxSound;
@ -171,6 +169,7 @@ class ChartingState extends MusicBeatState
add(curRenderedNotes); add(curRenderedNotes);
add(curRenderedSustains); add(curRenderedSustains);
changeSection();
super.create(); super.create();
} }
@ -217,11 +216,11 @@ class ChartingState extends MusicBeatState
var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 30, 'load autosave', loadAutosave); var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 30, 'load autosave', loadAutosave);
var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 1); var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 2);
stepperSpeed.value = _song.speed; stepperSpeed.value = _song.speed;
stepperSpeed.name = 'song_speed'; stepperSpeed.name = 'song_speed';
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 1, 1, 339, 0); var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 1, 100, 1, 999, 3);
stepperBPM.value = Conductor.bpm; stepperBPM.value = Conductor.bpm;
stepperBPM.name = 'song_bpm'; stepperBPM.name = 'song_bpm';
@ -230,14 +229,15 @@ class ChartingState extends MusicBeatState
var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String)
{ {
_song.player1 = characters[Std.parseInt(character)]; _song.player1 = characters[Std.parseInt(character)];
updateHeads();
}); });
player1DropDown.selectedLabel = _song.player1; player1DropDown.selectedLabel = _song.player1;
var player2DropDown = new FlxUIDropDownMenu(140, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) var player2DropDown = new FlxUIDropDownMenu(140, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String)
{ {
_song.player2 = characters[Std.parseInt(character)]; _song.player2 = characters[Std.parseInt(character)];
updateHeads();
}); });
player2DropDown.selectedLabel = _song.player2; player2DropDown.selectedLabel = _song.player2;
var tab_group_song = new FlxUI(null, UI_box); var tab_group_song = new FlxUI(null, UI_box);
@ -276,7 +276,7 @@ class ChartingState extends MusicBeatState
stepperLength.value = _song.notes[curSection].lengthInSteps; stepperLength.value = _song.notes[curSection].lengthInSteps;
stepperLength.name = "section_length"; stepperLength.name = "section_length";
stepperSectionBPM = new FlxUINumericStepper(10, 80, 1, Conductor.bpm, 0, 999, 0); stepperSectionBPM = new FlxUINumericStepper(10, 80, 1, Conductor.bpm, 1, 999, 3);
stepperSectionBPM.value = Conductor.bpm; stepperSectionBPM.value = Conductor.bpm;
stepperSectionBPM.name = 'section_bpm'; stepperSectionBPM.name = 'section_bpm';
@ -425,9 +425,9 @@ class ChartingState extends MusicBeatState
} }
else if (wname == 'song_bpm') else if (wname == 'song_bpm')
{ {
tempBpm = Std.int(nums.value); tempBpm = nums.value;
Conductor.mapBPMChanges(_song); Conductor.mapBPMChanges(_song);
Conductor.changeBPM(Std.int(nums.value)); Conductor.changeBPM(nums.value);
} }
else if (wname == 'note_susLength') else if (wname == 'note_susLength')
{ {
@ -436,7 +436,7 @@ class ChartingState extends MusicBeatState
} }
else if (wname == 'section_bpm') else if (wname == 'section_bpm')
{ {
_song.notes[curSection].bpm = Std.int(nums.value); _song.notes[curSection].bpm = nums.value;
updateGrid(); updateGrid();
} }
} }
@ -456,7 +456,7 @@ class ChartingState extends MusicBeatState
}*/ }*/
function sectionStartTime():Float function sectionStartTime():Float
{ {
var daBPM:Int = _song.bpm; var daBPM:Float = _song.bpm;
var daPos:Float = 0; var daPos:Float = 0;
for (i in 0...curSection) for (i in 0...curSection)
{ {
@ -793,13 +793,13 @@ class ChartingState extends MusicBeatState
{ {
if (check_mustHitSection.checked) if (check_mustHitSection.checked)
{ {
leftIcon.animation.play('bf'); leftIcon.changeIcon(_song.player1);
rightIcon.animation.play('dad'); rightIcon.changeIcon(_song.player2);
} }
else else
{ {
leftIcon.animation.play('dad'); leftIcon.changeIcon(_song.player2);
rightIcon.animation.play('bf'); rightIcon.changeIcon(_song.player1);
} }
} }
@ -831,7 +831,7 @@ class ChartingState extends MusicBeatState
else else
{ {
// get last bpm // get last bpm
var daBPM:Int = _song.bpm; var daBPM:Float = _song.bpm;
for (i in 0...curSection) for (i in 0...curSection)
if (_song.notes[i].changeBPM) if (_song.notes[i].changeBPM)
daBPM = _song.notes[i].bpm; daBPM = _song.notes[i].bpm;

View File

@ -11,12 +11,12 @@ typedef BPMChangeEvent =
{ {
var stepTime:Int; var stepTime:Int;
var songTime:Float; var songTime:Float;
var bpm:Int; var bpm:Float;
} }
class Conductor class Conductor
{ {
public static var bpm:Int = 100; public static var bpm:Float = 100;
public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds
public static var stepCrochet:Float = crochet / 4; // steps in milliseconds public static var stepCrochet:Float = crochet / 4; // steps in milliseconds
public static var songPosition:Float; public static var songPosition:Float;
@ -36,7 +36,7 @@ class Conductor
{ {
bpmChangeMap = []; bpmChangeMap = [];
var curBPM:Int = song.bpm; var curBPM:Float = song.bpm;
var totalSteps:Int = 0; var totalSteps:Int = 0;
var totalPos:Float = 0; var totalPos:Float = 0;
for (i in 0...song.notes.length) for (i in 0...song.notes.length)
@ -59,7 +59,7 @@ class Conductor
trace("new BPM map BUDDY " + bpmChangeMap); trace("new BPM map BUDDY " + bpmChangeMap);
} }
public static function changeBPM(newBpm:Int) public static function changeBPM(newBpm:Float)
{ {
bpm = newBpm; bpm = newBpm;

View File

@ -11,7 +11,7 @@ class HealthIcon extends FlxSprite
*/ */
public var sprTracker:FlxSprite; public var sprTracker:FlxSprite;
var char:String = 'bf'; var char:String = '';
var isPlayer:Bool = false; var isPlayer:Bool = false;
public function new(char:String = 'bf', isPlayer:Bool = false) public function new(char:String = 'bf', isPlayer:Bool = false)
@ -19,9 +19,8 @@ class HealthIcon extends FlxSprite
super(); super();
this.isPlayer = isPlayer; this.isPlayer = isPlayer;
this.char = char;
loadIcon(char); changeIcon(char);
antialiasing = true; antialiasing = true;
scrollFactor.set(); scrollFactor.set();
} }
@ -33,29 +32,26 @@ class HealthIcon extends FlxSprite
isOldIcon = !isOldIcon; isOldIcon = !isOldIcon;
if (isOldIcon) if (isOldIcon)
{ changeIcon('bf-old');
loadGraphic(Paths.image('icons/icon-bf-old'), true, 150, 150);
animation.add('bf-old', [0, 1], 0, false, isPlayer);
animation.play('bf-old');
}
else else
loadIcon(char); changeIcon('bf');
} }
function loadIcon(char:String):Void public function changeIcon(newChar:String):Void
{ {
var realChar:String = ""; if (newChar != 'bf-pixel' && newChar != 'bf-old')
switch (char) newChar = newChar.split('-')[0].trim();
{
case 'bf-pixel':
realChar = char;
default:
realChar = char.split('-')[0].trim();
}
loadGraphic(Paths.image('icons/icon-' + realChar), true, 150, 150); if (newChar != char)
animation.add(realChar, [0, 1], 0, false, isPlayer); {
animation.play(realChar); if (animation.getByName(newChar) == null)
{
loadGraphic(Paths.image('icons/icon-' + newChar), true, 150, 150);
animation.add(newChar, [0, 1], 0, false, isPlayer);
}
animation.play(newChar);
char = newChar;
}
} }
override function update(elapsed:Float) override function update(elapsed:Float)

View File

@ -994,7 +994,7 @@ class PlayState extends MusicBeatState
{ {
case 0: case 0:
FlxG.sound.play(Paths.sound('intro3'), 0.6); FlxG.sound.play(Paths.sound('intro3' + altSuffix), 0.6);
case 1: case 1:
var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0])); var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0]));
ready.scrollFactor.set(); ready.scrollFactor.set();
@ -1012,7 +1012,7 @@ class PlayState extends MusicBeatState
ready.destroy(); ready.destroy();
} }
}); });
FlxG.sound.play(Paths.sound('intro2'), 0.6); FlxG.sound.play(Paths.sound('intro2' + altSuffix), 0.6);
case 2: case 2:
var set:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[1])); var set:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[1]));
set.scrollFactor.set(); set.scrollFactor.set();
@ -1029,7 +1029,7 @@ class PlayState extends MusicBeatState
set.destroy(); set.destroy();
} }
}); });
FlxG.sound.play(Paths.sound('intro1'), 0.6); FlxG.sound.play(Paths.sound('intro1' + altSuffix), 0.6);
case 3: case 3:
var go:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[2])); var go:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[2]));
go.scrollFactor.set(); go.scrollFactor.set();
@ -1048,13 +1048,12 @@ class PlayState extends MusicBeatState
go.destroy(); go.destroy();
} }
}); });
FlxG.sound.play(Paths.sound('introGo'), 0.6); FlxG.sound.play(Paths.sound('introGo' + altSuffix), 0.6);
case 4:
} }
swagCounter += 1; swagCounter += 1;
// generateSong('fresh'); // generateSong('fresh');
}, 5); }, 4);
} }
var previousFrameTime:Int = 0; var previousFrameTime:Int = 0;
@ -2013,157 +2012,92 @@ class PlayState extends MusicBeatState
private function keyShit():Void private function keyShit():Void
{ {
// HOLDING // control arrays, order L D R U
var up = controls.NOTE_UP; var holdArray:Array<Bool> = [controls.NOTE_LEFT, controls.NOTE_DOWN, controls.NOTE_UP, controls.NOTE_RIGHT];
var right = controls.NOTE_RIGHT; var pressArray:Array<Bool> = [controls.NOTE_LEFT_P, controls.NOTE_DOWN_P, controls.NOTE_UP_P, controls.NOTE_RIGHT_P];
var down = controls.NOTE_DOWN; var releaseArray:Array<Bool> = [controls.NOTE_LEFT_R, controls.NOTE_DOWN_R, controls.NOTE_UP_R, controls.NOTE_RIGHT_R];
var left = controls.NOTE_LEFT;
var upP = controls.NOTE_UP_P; // HOLDS, check for sustain notes
var rightP = controls.NOTE_RIGHT_P; if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
var downP = controls.NOTE_DOWN_P;
var leftP = controls.NOTE_LEFT_P;
var upR = controls.NOTE_UP_R;
var rightR = controls.NOTE_RIGHT_R;
var downR = controls.NOTE_DOWN_R;
var leftR = controls.NOTE_LEFT_R;
var controlArray:Array<Bool> = [leftP, downP, upP, rightP];
// FlxG.watch.addQuick('asdfa', upP);
if ((upP || rightP || downP || leftP) && generatedMusic)
{ {
// note to self, used to have stunned notes.forEachAlive(function(daNote:Note)
// && !boyfriend.stunned {
if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.noteData])
goodNoteHit(daNote);
});
}
// PRESSES, check for note hits
if (pressArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
{
boyfriend.holdTimer = 0; boyfriend.holdTimer = 0;
var possibleNotes:Array<Note> = []; var possibleNotes:Array<Note> = []; // notes that can be hit
var directionList:Array<Int> = []; // directions that can be hit
var ignoreList:Array<Int> = []; var dumbNotes:Array<Note> = []; // notes to kill later
notes.forEachAlive(function(daNote:Note) notes.forEachAlive(function(daNote:Note)
{ {
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit) if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
{ {
// the sorting probably doesn't need to be in here? who cares lol if (directionList.contains(daNote.noteData))
possibleNotes.push(daNote);
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
ignoreList.push(daNote.noteData);
}
});
if (possibleNotes.length > 0)
{
var daNote = possibleNotes[0];
if (perfectMode)
noteCheck(true, daNote);
// Jump notes
if (possibleNotes.length >= 2)
{
if (possibleNotes[0].strumTime == possibleNotes[1].strumTime)
{ {
for (coolNote in possibleNotes) for (coolNote in possibleNotes)
{ {
if (controlArray[coolNote.noteData]) if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
goodNoteHit(coolNote); { // if it's the same note twice at < 10ms distance, just delete it
else // EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
{ dumbNotes.push(daNote);
var inIgnoreList:Bool = false; break;
for (shit in 0...ignoreList.length) }
{ else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
if (controlArray[ignoreList[shit]]) { // if daNote is earlier than existing note (coolNote), replace
inIgnoreList = true; possibleNotes.remove(coolNote);
} possibleNotes.push(daNote);
if (!inIgnoreList) break;
badNoteCheck();
} }
} }
} }
else if (possibleNotes[0].noteData == possibleNotes[1].noteData)
{
noteCheck(controlArray[daNote.noteData], daNote);
}
else else
{ {
for (coolNote in possibleNotes) possibleNotes.push(daNote);
{ directionList.push(daNote.noteData);
noteCheck(controlArray[coolNote.noteData], coolNote);
}
}
}
else // regular notes?
{
noteCheck(controlArray[daNote.noteData], daNote);
}
/*
if (controlArray[daNote.noteData])
goodNoteHit(daNote);
*/
// trace(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)
{
daNote.kill();
notes.remove(daNote, true);
daNote.destroy();
}
*/
}
else
{
badNoteCheck();
}
}
if ((up || right || down || left) && /*!boyfriend.stunned && */ generatedMusic)
{
notes.forEachAlive(function(daNote:Note)
{
if (daNote.canBeHit && daNote.mustPress && daNote.isSustainNote)
{
switch (daNote.noteData)
{
// NOTES YOU ARE HOLDING
case 0:
if (left)
goodNoteHit(daNote);
case 1:
if (down)
goodNoteHit(daNote);
case 2:
if (up)
goodNoteHit(daNote);
case 3:
if (right)
goodNoteHit(daNote);
} }
} }
}); });
for (note in dumbNotes)
{
FlxG.log.add("killing dumb ass note at "+note.strumTime);
note.kill();
notes.remove(note, true);
note.destroy();
}
possibleNotes.sort((a, b) -> Std.int(a.strumTime - b.strumTime));
if (perfectMode)
goodNoteHit(possibleNotes[0]);
else if (possibleNotes.length > 0)
{
for (shit in 0...pressArray.length)
{ // if a direction is hit that shouldn't be
if (pressArray[shit] && !directionList.contains(shit))
badNoteHit();
}
for (coolNote in possibleNotes)
{
if (pressArray[coolNote.noteData])
goodNoteHit(coolNote);
}
}
else
{
badNoteHit();
}
} }
if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !up && !down && !right && !left) if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !holdArray.contains(true))
{ {
if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss')) if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss'))
{ {
@ -2173,29 +2107,10 @@ class PlayState extends MusicBeatState
playerStrums.forEach(function(spr:FlxSprite) playerStrums.forEach(function(spr:FlxSprite)
{ {
switch (spr.ID) if (pressArray[spr.ID] && spr.animation.curAnim.name != 'confirm')
{ spr.animation.play('pressed');
case 0: if (!holdArray[spr.ID])
if (leftP && spr.animation.curAnim.name != 'confirm') spr.animation.play('static');
spr.animation.play('pressed');
if (leftR)
spr.animation.play('static');
case 1:
if (downP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (downR)
spr.animation.play('static');
case 2:
if (upP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (upR)
spr.animation.play('static');
case 3:
if (rightP && spr.animation.curAnim.name != 'confirm')
spr.animation.play('pressed');
if (rightR)
spr.animation.play('static');
}
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
{ {
@ -2247,14 +2162,14 @@ class PlayState extends MusicBeatState
} }
} }
function badNoteCheck() function badNoteHit()
{ {
// just double pasting this shit cuz fuk u // just double pasting this shit cuz fuk u
// REDO THIS SYSTEM! // REDO THIS SYSTEM!
var leftP = controls.NOTE_LEFT_P;
var downP = controls.NOTE_DOWN_P;
var upP = controls.NOTE_UP_P; var upP = controls.NOTE_UP_P;
var rightP = controls.NOTE_RIGHT_P; var rightP = controls.NOTE_RIGHT_P;
var downP = controls.NOTE_DOWN_P;
var leftP = controls.NOTE_LEFT_P;
if (leftP) if (leftP)
noteMiss(0); noteMiss(0);
@ -2266,16 +2181,6 @@ class PlayState extends MusicBeatState
noteMiss(3); noteMiss(3);
} }
function noteCheck(keyP:Bool, note:Note):Void
{
if (keyP)
goodNoteHit(note);
else
{
badNoteCheck();
}
}
function goodNoteHit(note:Note):Void function goodNoteHit(note:Note):Void
{ {
if (!note.wasGoodHit) if (!note.wasGoodHit)
@ -2413,7 +2318,7 @@ class PlayState extends MusicBeatState
override function stepHit() override function stepHit()
{ {
super.stepHit(); super.stepHit();
if (FlxG.sound.music.time > Conductor.songPosition + 20 || FlxG.sound.music.time < Conductor.songPosition - 20) if (Math.abs(FlxG.sound.music.time - Conductor.songPosition) > 20 || (SONG.needsVoices && Math.abs(vocals.time - Conductor.songPosition) > 20))
{ {
resyncVocals(); resyncVocals();
} }

View File

@ -6,7 +6,7 @@ typedef SwagSection =
var lengthInSteps:Int; var lengthInSteps:Int;
var typeOfSection:Int; var typeOfSection:Int;
var mustHitSection:Bool; var mustHitSection:Bool;
var bpm:Int; var bpm:Float;
var changeBPM:Bool; var changeBPM:Bool;
var altAnim:Bool; var altAnim:Bool;
} }

View File

@ -11,7 +11,7 @@ typedef SwagSong =
{ {
var song:String; var song:String;
var notes:Array<SwagSection>; var notes:Array<SwagSection>;
var bpm:Int; var bpm:Float;
var needsVoices:Bool; var needsVoices:Bool;
var speed:Float; var speed:Float;
@ -24,7 +24,7 @@ class Song
{ {
public var song:String; public var song:String;
public var notes:Array<SwagSection>; public var notes:Array<SwagSection>;
public var bpm:Int; public var bpm:Float;
public var needsVoices:Bool = true; public var needsVoices:Bool = true;
public var speed:Float = 1; public var speed:Float = 1;

View File

@ -227,6 +227,9 @@ class StoryMenuState extends MusicBeatState
// scoreText.setFormat('VCR OSD Mono', 32); // scoreText.setFormat('VCR OSD Mono', 32);
lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5)); lerpScore = Math.floor(FlxMath.lerp(lerpScore, intendedScore, 0.5));
if (Math.abs(lerpScore - intendedScore) <= 10)
lerpScore = intendedScore;
scoreText.text = "WEEK SCORE:" + lerpScore; scoreText.text = "WEEK SCORE:" + lerpScore;
txtWeekTitle.text = weekNames[curWeek].toUpperCase(); txtWeekTitle.text = weekNames[curWeek].toUpperCase();