Merge pull request #415 from PrincessMtH/master
Better sustain note trails
This commit is contained in:
commit
4d214fd8b9
@ -51,33 +51,7 @@ class Note extends FlxSprite
|
|||||||
|
|
||||||
switch (daStage)
|
switch (daStage)
|
||||||
{
|
{
|
||||||
case 'school':
|
case 'school' | 'schoolEvil':
|
||||||
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
|
|
||||||
|
|
||||||
animation.add('greenScroll', [6]);
|
|
||||||
animation.add('redScroll', [7]);
|
|
||||||
animation.add('blueScroll', [5]);
|
|
||||||
animation.add('purpleScroll', [4]);
|
|
||||||
|
|
||||||
if (isSustainNote)
|
|
||||||
{
|
|
||||||
loadGraphic('assets/images/weeb/pixelUI/arrowEnds.png', true, 7, 6);
|
|
||||||
|
|
||||||
animation.add('purpleholdend', [4]);
|
|
||||||
animation.add('greenholdend', [6]);
|
|
||||||
animation.add('redholdend', [7]);
|
|
||||||
animation.add('blueholdend', [5]);
|
|
||||||
|
|
||||||
animation.add('purplehold', [0]);
|
|
||||||
animation.add('greenhold', [2]);
|
|
||||||
animation.add('redhold', [3]);
|
|
||||||
animation.add('bluehold', [1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
|
|
||||||
updateHitbox();
|
|
||||||
|
|
||||||
case 'schoolEvil': // COPY PASTED CUZ I AM LAZY
|
|
||||||
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
|
loadGraphic('assets/images/weeb/pixelUI/arrows-pixels.png', true, 17, 17);
|
||||||
|
|
||||||
animation.add('greenScroll', [6]);
|
animation.add('greenScroll', [6]);
|
||||||
@ -174,18 +148,18 @@ class Note extends FlxSprite
|
|||||||
{
|
{
|
||||||
switch (prevNote.noteData)
|
switch (prevNote.noteData)
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
prevNote.animation.play('purplehold');
|
||||||
|
case 1:
|
||||||
|
prevNote.animation.play('bluehold');
|
||||||
case 2:
|
case 2:
|
||||||
prevNote.animation.play('greenhold');
|
prevNote.animation.play('greenhold');
|
||||||
case 3:
|
case 3:
|
||||||
prevNote.animation.play('redhold');
|
prevNote.animation.play('redhold');
|
||||||
case 1:
|
|
||||||
prevNote.animation.play('bluehold');
|
|
||||||
case 0:
|
|
||||||
prevNote.animation.play('purplehold');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prevNote.offset.y = -19;
|
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
|
||||||
prevNote.scale.y *= (2.25 * FlxMath.roundDecimal(PlayState.SONG.speed, 1));
|
prevNote.updateHitbox();
|
||||||
// prevNote.setGraphicSize();
|
// prevNote.setGraphicSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1096,6 +1096,16 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
switch (Math.abs(i))
|
switch (Math.abs(i))
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
babyArrow.x += Note.swagWidth * 0;
|
||||||
|
babyArrow.animation.add('static', [0]);
|
||||||
|
babyArrow.animation.add('pressed', [4, 8], 12, false);
|
||||||
|
babyArrow.animation.add('confirm', [12, 16], 24, false);
|
||||||
|
case 1:
|
||||||
|
babyArrow.x += Note.swagWidth * 1;
|
||||||
|
babyArrow.animation.add('static', [1]);
|
||||||
|
babyArrow.animation.add('pressed', [5, 9], 12, false);
|
||||||
|
babyArrow.animation.add('confirm', [13, 17], 24, false);
|
||||||
case 2:
|
case 2:
|
||||||
babyArrow.x += Note.swagWidth * 2;
|
babyArrow.x += Note.swagWidth * 2;
|
||||||
babyArrow.animation.add('static', [2]);
|
babyArrow.animation.add('static', [2]);
|
||||||
@ -1106,16 +1116,6 @@ class PlayState extends MusicBeatState
|
|||||||
babyArrow.animation.add('static', [3]);
|
babyArrow.animation.add('static', [3]);
|
||||||
babyArrow.animation.add('pressed', [7, 11], 12, false);
|
babyArrow.animation.add('pressed', [7, 11], 12, false);
|
||||||
babyArrow.animation.add('confirm', [15, 19], 24, false);
|
babyArrow.animation.add('confirm', [15, 19], 24, false);
|
||||||
case 1:
|
|
||||||
babyArrow.x += Note.swagWidth * 1;
|
|
||||||
babyArrow.animation.add('static', [1]);
|
|
||||||
babyArrow.animation.add('pressed', [5, 9], 12, false);
|
|
||||||
babyArrow.animation.add('confirm', [13, 17], 24, false);
|
|
||||||
case 0:
|
|
||||||
babyArrow.x += Note.swagWidth * 0;
|
|
||||||
babyArrow.animation.add('static', [0]);
|
|
||||||
babyArrow.animation.add('pressed', [4, 8], 12, false);
|
|
||||||
babyArrow.animation.add('confirm', [12, 16], 24, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1130,6 +1130,16 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
switch (Math.abs(i))
|
switch (Math.abs(i))
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
babyArrow.x += Note.swagWidth * 0;
|
||||||
|
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
|
||||||
|
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
|
||||||
|
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
|
||||||
|
case 1:
|
||||||
|
babyArrow.x += Note.swagWidth * 1;
|
||||||
|
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
|
||||||
|
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
|
||||||
|
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
|
||||||
case 2:
|
case 2:
|
||||||
babyArrow.x += Note.swagWidth * 2;
|
babyArrow.x += Note.swagWidth * 2;
|
||||||
babyArrow.animation.addByPrefix('static', 'arrowUP');
|
babyArrow.animation.addByPrefix('static', 'arrowUP');
|
||||||
@ -1140,16 +1150,6 @@ class PlayState extends MusicBeatState
|
|||||||
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
|
babyArrow.animation.addByPrefix('static', 'arrowRIGHT');
|
||||||
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
|
babyArrow.animation.addByPrefix('pressed', 'right press', 24, false);
|
||||||
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
|
babyArrow.animation.addByPrefix('confirm', 'right confirm', 24, false);
|
||||||
case 1:
|
|
||||||
babyArrow.x += Note.swagWidth * 1;
|
|
||||||
babyArrow.animation.addByPrefix('static', 'arrowDOWN');
|
|
||||||
babyArrow.animation.addByPrefix('pressed', 'down press', 24, false);
|
|
||||||
babyArrow.animation.addByPrefix('confirm', 'down confirm', 24, false);
|
|
||||||
case 0:
|
|
||||||
babyArrow.x += Note.swagWidth * 0;
|
|
||||||
babyArrow.animation.addByPrefix('static', 'arrowLEFT');
|
|
||||||
babyArrow.animation.addByPrefix('pressed', 'left press', 24, false);
|
|
||||||
babyArrow.animation.addByPrefix('confirm', 'left confirm', 24, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1501,6 +1501,20 @@ class PlayState extends MusicBeatState
|
|||||||
daNote.active = true;
|
daNote.active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
|
||||||
|
|
||||||
|
// i am so fucking sorry for this if condition
|
||||||
|
if (daNote.isSustainNote && daNote.y + daNote.offset.y <= strumLine.y + Note.swagWidth/2
|
||||||
|
&& (!daNote.mustPress || (daNote.wasGoodHit ||
|
||||||
|
(daNote.prevNote.wasGoodHit && !daNote.canBeHit))))
|
||||||
|
{
|
||||||
|
var swagRect = new FlxRect(0, strumLine.y + Note.swagWidth/2 - daNote.y, daNote.width * 2, daNote.height * 2);
|
||||||
|
swagRect.y /= daNote.scale.y;
|
||||||
|
swagRect.height -= swagRect.y;
|
||||||
|
|
||||||
|
daNote.clipRect = swagRect;
|
||||||
|
}
|
||||||
|
|
||||||
if (!daNote.mustPress && daNote.wasGoodHit)
|
if (!daNote.mustPress && daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
if (SONG.song != 'Tutorial')
|
if (SONG.song != 'Tutorial')
|
||||||
@ -1516,14 +1530,14 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
switch (Math.abs(daNote.noteData))
|
switch (Math.abs(daNote.noteData))
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
dad.playAnim('singLEFT' + altAnim, true);
|
||||||
|
case 1:
|
||||||
|
dad.playAnim('singDOWN' + altAnim, true);
|
||||||
case 2:
|
case 2:
|
||||||
dad.playAnim('singUP' + altAnim, true);
|
dad.playAnim('singUP' + altAnim, true);
|
||||||
case 3:
|
case 3:
|
||||||
dad.playAnim('singRIGHT' + altAnim, true);
|
dad.playAnim('singRIGHT' + altAnim, true);
|
||||||
case 1:
|
|
||||||
dad.playAnim('singDOWN' + altAnim, true);
|
|
||||||
case 0:
|
|
||||||
dad.playAnim('singLEFT' + altAnim, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dad.holdTimer = 0;
|
dad.holdTimer = 0;
|
||||||
@ -1536,12 +1550,18 @@ class PlayState extends MusicBeatState
|
|||||||
daNote.destroy();
|
daNote.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(PlayState.SONG.speed, 2)));
|
|
||||||
|
|
||||||
// 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 * PlayState.SONG.speed));
|
// daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));
|
||||||
|
|
||||||
if (daNote.y < -daNote.height)
|
if (daNote.y < -daNote.height)
|
||||||
|
{
|
||||||
|
if (daNote.isSustainNote && daNote.wasGoodHit)
|
||||||
|
{
|
||||||
|
daNote.kill();
|
||||||
|
notes.remove(daNote, true);
|
||||||
|
daNote.destroy();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (daNote.tooLate || !daNote.wasGoodHit)
|
if (daNote.tooLate || !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
@ -1556,6 +1576,7 @@ class PlayState extends MusicBeatState
|
|||||||
notes.remove(daNote, true);
|
notes.remove(daNote, true);
|
||||||
daNote.destroy();
|
daNote.destroy();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1934,18 +1955,18 @@ class PlayState extends MusicBeatState
|
|||||||
switch (daNote.noteData)
|
switch (daNote.noteData)
|
||||||
{
|
{
|
||||||
// NOTES YOU ARE HOLDING
|
// NOTES YOU ARE HOLDING
|
||||||
|
case 0:
|
||||||
|
if (left)
|
||||||
|
goodNoteHit(daNote);
|
||||||
|
case 1:
|
||||||
|
if (down)
|
||||||
|
goodNoteHit(daNote);
|
||||||
case 2:
|
case 2:
|
||||||
if (up)
|
if (up)
|
||||||
goodNoteHit(daNote);
|
goodNoteHit(daNote);
|
||||||
case 3:
|
case 3:
|
||||||
if (right)
|
if (right)
|
||||||
goodNoteHit(daNote);
|
goodNoteHit(daNote);
|
||||||
case 1:
|
|
||||||
if (down)
|
|
||||||
goodNoteHit(daNote);
|
|
||||||
case 0:
|
|
||||||
if (left)
|
|
||||||
goodNoteHit(daNote);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1963,6 +1984,16 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
switch (spr.ID)
|
switch (spr.ID)
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
if (leftP && spr.animation.curAnim.name != 'confirm')
|
||||||
|
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:
|
case 2:
|
||||||
if (upP && spr.animation.curAnim.name != 'confirm')
|
if (upP && spr.animation.curAnim.name != 'confirm')
|
||||||
spr.animation.play('pressed');
|
spr.animation.play('pressed');
|
||||||
@ -1973,16 +2004,6 @@ class PlayState extends MusicBeatState
|
|||||||
spr.animation.play('pressed');
|
spr.animation.play('pressed');
|
||||||
if (rightR)
|
if (rightR)
|
||||||
spr.animation.play('static');
|
spr.animation.play('static');
|
||||||
case 1:
|
|
||||||
if (downP && spr.animation.curAnim.name != 'confirm')
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
if (downR)
|
|
||||||
spr.animation.play('static');
|
|
||||||
case 0:
|
|
||||||
if (leftP && spr.animation.curAnim.name != 'confirm')
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
if (leftR)
|
|
||||||
spr.animation.play('static');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||||
@ -2023,14 +2044,14 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
boyfriend.playAnim('singLEFTmiss', true);
|
||||||
|
case 1:
|
||||||
|
boyfriend.playAnim('singDOWNmiss', true);
|
||||||
case 2:
|
case 2:
|
||||||
boyfriend.playAnim('singUPmiss', true);
|
boyfriend.playAnim('singUPmiss', true);
|
||||||
case 3:
|
case 3:
|
||||||
boyfriend.playAnim('singRIGHTmiss', true);
|
boyfriend.playAnim('singRIGHTmiss', true);
|
||||||
case 1:
|
|
||||||
boyfriend.playAnim('singDOWNmiss', true);
|
|
||||||
case 0:
|
|
||||||
boyfriend.playAnim('singLEFTmiss', true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2046,12 +2067,12 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
if (leftP)
|
if (leftP)
|
||||||
noteMiss(0);
|
noteMiss(0);
|
||||||
|
if (downP)
|
||||||
|
noteMiss(1);
|
||||||
if (upP)
|
if (upP)
|
||||||
noteMiss(2);
|
noteMiss(2);
|
||||||
if (rightP)
|
if (rightP)
|
||||||
noteMiss(3);
|
noteMiss(3);
|
||||||
if (downP)
|
|
||||||
noteMiss(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function noteCheck(keyP:Bool, note:Note):Void
|
function noteCheck(keyP:Bool, note:Note):Void
|
||||||
@ -2081,14 +2102,14 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
switch (note.noteData)
|
switch (note.noteData)
|
||||||
{
|
{
|
||||||
|
case 0:
|
||||||
|
boyfriend.playAnim('singLEFT', true);
|
||||||
|
case 1:
|
||||||
|
boyfriend.playAnim('singDOWN', true);
|
||||||
case 2:
|
case 2:
|
||||||
boyfriend.playAnim('singUP', true);
|
boyfriend.playAnim('singUP', true);
|
||||||
case 3:
|
case 3:
|
||||||
boyfriend.playAnim('singRIGHT', true);
|
boyfriend.playAnim('singRIGHT', true);
|
||||||
case 1:
|
|
||||||
boyfriend.playAnim('singDOWN', true);
|
|
||||||
case 0:
|
|
||||||
boyfriend.playAnim('singLEFT', true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStrums.forEach(function(spr:FlxSprite)
|
playerStrums.forEach(function(spr:FlxSprite)
|
||||||
@ -2102,11 +2123,14 @@ class PlayState extends MusicBeatState
|
|||||||
note.wasGoodHit = true;
|
note.wasGoodHit = true;
|
||||||
vocals.volume = 1;
|
vocals.volume = 1;
|
||||||
|
|
||||||
|
if (!note.isSustainNote)
|
||||||
|
{
|
||||||
note.kill();
|
note.kill();
|
||||||
notes.remove(note, true);
|
notes.remove(note, true);
|
||||||
note.destroy();
|
note.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var fastCarCanDrive:Bool = true;
|
var fastCarCanDrive:Bool = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user