Updated to week 7 input wit anti mash
This commit is contained in:
parent
012a9c693d
commit
110da06bc5
@ -420,6 +420,8 @@ class PlayState extends MusicBeatState
|
|||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (FlxG.sound.music != null)
|
if (FlxG.sound.music != null)
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
@ -1347,6 +1349,10 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
// hud/camera
|
// hud/camera
|
||||||
|
|
||||||
|
trace(Lua_helper.add_callback(lua,"setHudAngle", function (x:Float) {
|
||||||
|
camHUD.angle = x;
|
||||||
|
}));
|
||||||
|
|
||||||
trace(Lua_helper.add_callback(lua,"setHudPosition", function (x:Int, y:Int) {
|
trace(Lua_helper.add_callback(lua,"setHudPosition", function (x:Int, y:Int) {
|
||||||
camHUD.x = x;
|
camHUD.x = x;
|
||||||
camHUD.y = y;
|
camHUD.y = y;
|
||||||
@ -2600,7 +2606,10 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
if (FlxG.save.data.downscroll)
|
if (FlxG.save.data.downscroll)
|
||||||
{
|
{
|
||||||
daNote.y = (strumLine.y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
if (daNote.mustPress)
|
||||||
|
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||||
|
else
|
||||||
|
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||||
if(daNote.isSustainNote)
|
if(daNote.isSustainNote)
|
||||||
{
|
{
|
||||||
// Remember = minus makes notes go up, plus makes them go down
|
// Remember = minus makes notes go up, plus makes them go down
|
||||||
@ -2613,7 +2622,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
// Clip to strumline
|
// Clip to strumline
|
||||||
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
|
||||||
swagRect.height = (strumLine.y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
swagRect.y = daNote.frameHeight - swagRect.height;
|
swagRect.y = daNote.frameHeight - swagRect.height;
|
||||||
|
|
||||||
daNote.clipRect = swagRect;
|
daNote.clipRect = swagRect;
|
||||||
@ -2621,7 +2630,10 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
daNote.y = (strumLine.y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
if (daNote.mustPress)
|
||||||
|
daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||||
|
else
|
||||||
|
daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y - 0.45 * (Conductor.songPosition - daNote.strumTime) * FlxMath.roundDecimal(FlxG.save.data.scrollSpeed == 1 ? SONG.speed : FlxG.save.data.scrollSpeed, 2));
|
||||||
if(daNote.isSustainNote)
|
if(daNote.isSustainNote)
|
||||||
{
|
{
|
||||||
daNote.y -= daNote.height / 2;
|
daNote.y -= daNote.height / 2;
|
||||||
@ -2630,7 +2642,7 @@ class PlayState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
// Clip to strumline
|
// Clip to strumline
|
||||||
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
|
||||||
swagRect.y = (strumLine.y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y + Note.swagWidth / 2 - daNote.y) / daNote.scale.y;
|
||||||
swagRect.height -= swagRect.y;
|
swagRect.height -= swagRect.y;
|
||||||
|
|
||||||
daNote.clipRect = swagRect;
|
daNote.clipRect = swagRect;
|
||||||
@ -3149,368 +3161,135 @@ class PlayState extends MusicBeatState
|
|||||||
var rightHold:Bool = false;
|
var rightHold:Bool = false;
|
||||||
var leftHold:Bool = false;
|
var leftHold:Bool = false;
|
||||||
|
|
||||||
private function keyShit():Void
|
private function keyShit():Void // I've invested in emma stocks
|
||||||
{
|
|
||||||
if (mashing != 0)
|
|
||||||
mashing = 0;
|
|
||||||
|
|
||||||
// HOLDING
|
|
||||||
var up = controls.UP;
|
|
||||||
var right = controls.RIGHT;
|
|
||||||
var down = controls.DOWN;
|
|
||||||
var left = controls.LEFT;
|
|
||||||
|
|
||||||
var upP = controls.UP_P;
|
|
||||||
var rightP = controls.RIGHT_P;
|
|
||||||
var downP = controls.DOWN_P;
|
|
||||||
var leftP = controls.LEFT_P;
|
|
||||||
|
|
||||||
var upR = controls.UP_R;
|
|
||||||
var rightR = controls.RIGHT_R;
|
|
||||||
var downR = controls.DOWN_R;
|
|
||||||
var leftR = controls.LEFT_R;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (loadRep) // replay code
|
|
||||||
{
|
|
||||||
// disable input
|
|
||||||
up = false;
|
|
||||||
down = false;
|
|
||||||
right = false;
|
|
||||||
left = false;
|
|
||||||
|
|
||||||
// new input
|
|
||||||
|
|
||||||
|
|
||||||
//if (rep.replay.keys[repPresses].time == Conductor.songPosition)
|
|
||||||
// trace('DO IT!!!!!');
|
|
||||||
|
|
||||||
//timeCurrently = Math.abs(rep.replay.keyPresses[repPresses].time - Conductor.songPosition);
|
|
||||||
//timeCurrentlyR = Math.abs(rep.replay.keyReleases[repReleases].time - Conductor.songPosition);
|
|
||||||
|
|
||||||
|
|
||||||
if (repPresses < rep.replay.keyPresses.length && repReleases < rep.replay.keyReleases.length)
|
|
||||||
{
|
{
|
||||||
upP = rep.replay.keyPresses[repPresses].time + 1 <= Conductor.songPosition && rep.replay.keyPresses[repPresses].key == "up";
|
// control arrays, order L D R U
|
||||||
rightP = rep.replay.keyPresses[repPresses].time + 1 <= Conductor.songPosition && rep.replay.keyPresses[repPresses].key == "right";
|
var holdArray:Array<Bool> = [controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT];
|
||||||
downP = rep.replay.keyPresses[repPresses].time + 1 <= Conductor.songPosition && rep.replay.keyPresses[repPresses].key == "down";
|
var pressArray:Array<Bool> = [
|
||||||
leftP = rep.replay.keyPresses[repPresses].time + 1 <= Conductor.songPosition && rep.replay.keyPresses[repPresses].key == "left";
|
controls.LEFT_P,
|
||||||
|
controls.DOWN_P,
|
||||||
upR = rep.replay.keyPresses[repReleases].time - 1 <= Conductor.songPosition && rep.replay.keyReleases[repReleases].key == "up";
|
controls.UP_P,
|
||||||
rightR = rep.replay.keyPresses[repReleases].time - 1 <= Conductor.songPosition && rep.replay.keyReleases[repReleases].key == "right";
|
controls.RIGHT_P
|
||||||
downR = rep.replay.keyPresses[repReleases].time - 1<= Conductor.songPosition && rep.replay.keyReleases[repReleases].key == "down";
|
];
|
||||||
leftR = rep.replay.keyPresses[repReleases].time - 1<= Conductor.songPosition && rep.replay.keyReleases[repReleases].key == "left";
|
var releaseArray:Array<Bool> = [
|
||||||
|
controls.LEFT_R,
|
||||||
upHold = upP ? true : upR ? false : true;
|
controls.DOWN_R,
|
||||||
rightHold = rightP ? true : rightR ? false : true;
|
controls.UP_R,
|
||||||
downHold = downP ? true : downR ? false : true;
|
controls.RIGHT_R
|
||||||
leftHold = leftP ? true : leftR ? false : true;
|
];
|
||||||
}
|
|
||||||
}
|
// HOLDS, check for sustain notes
|
||||||
else if (!loadRep) // record replay code
|
if (holdArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
||||||
{
|
|
||||||
if (upP)
|
|
||||||
rep.replay.keyPresses.push({time: Conductor.songPosition, key: "up"});
|
|
||||||
if (rightP)
|
|
||||||
rep.replay.keyPresses.push({time: Conductor.songPosition, key: "right"});
|
|
||||||
if (downP)
|
|
||||||
rep.replay.keyPresses.push({time: Conductor.songPosition, key: "down"});
|
|
||||||
if (leftP)
|
|
||||||
rep.replay.keyPresses.push({time: Conductor.songPosition, key: "left"});
|
|
||||||
|
|
||||||
if (upR)
|
|
||||||
rep.replay.keyReleases.push({time: Conductor.songPosition, key: "up"});
|
|
||||||
if (rightR)
|
|
||||||
rep.replay.keyReleases.push({time: Conductor.songPosition, key: "right"});
|
|
||||||
if (downR)
|
|
||||||
rep.replay.keyReleases.push({time: Conductor.songPosition, key: "down"});
|
|
||||||
if (leftR)
|
|
||||||
rep.replay.keyReleases.push({time: Conductor.songPosition, key: "left"});
|
|
||||||
}
|
|
||||||
var controlArray:Array<Bool> = [leftP, downP, upP, rightP];
|
|
||||||
|
|
||||||
for (b in controlArray) { // get every key press
|
|
||||||
if (b)
|
|
||||||
mashing++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlxG.watch.addQuick('asdfa', upP);
|
|
||||||
if ((upP || rightP || downP || leftP) && !boyfriend.stunned && generatedMusic)
|
|
||||||
{
|
|
||||||
repPresses++;
|
|
||||||
boyfriend.holdTimer = 0;
|
|
||||||
|
|
||||||
var possibleNotes:Array<Note> = [];
|
|
||||||
|
|
||||||
var ignoreList:Array<Int> = [];
|
|
||||||
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
|
||||||
{
|
{
|
||||||
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate)
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
// the sorting probably doesn't need to be in here? who cares lol
|
if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[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];
|
|
||||||
|
|
||||||
// Jump notes
|
|
||||||
if (possibleNotes.length >= 2)
|
|
||||||
{
|
|
||||||
if (possibleNotes[0].strumTime == possibleNotes[1].strumTime)
|
|
||||||
{
|
|
||||||
for (coolNote in possibleNotes)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (controlArray[coolNote.noteData])
|
|
||||||
{
|
|
||||||
|
|
||||||
goodNoteHit(coolNote, (mashing > getKeyPresses(coolNote)));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (possibleNotes[0].noteData == possibleNotes[1].noteData)
|
|
||||||
{
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
|
||||||
|
|
||||||
daNote.rating = Ratings.CalculateRating(noteDiff);
|
|
||||||
|
|
||||||
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
|
|
||||||
{
|
|
||||||
//goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
|
||||||
trace('force note hit');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, daNote);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, daNote);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (coolNote in possibleNotes)
|
|
||||||
{
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
if (NearlyEquals(coolNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
|
|
||||||
{
|
|
||||||
var noteDiff:Float = Math.abs(coolNote.strumTime - Conductor.songPosition);
|
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.70 || noteDiff < Conductor.safeZoneOffset * -0.70)
|
|
||||||
coolNote.rating = "shit";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.50 || noteDiff < Conductor.safeZoneOffset * -0.50)
|
|
||||||
coolNote.rating = "bad";
|
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.45 || noteDiff < Conductor.safeZoneOffset * -0.45)
|
|
||||||
coolNote.rating = "good";
|
|
||||||
else if (noteDiff < Conductor.safeZoneOffset * 0.44 && noteDiff > Conductor.safeZoneOffset * -0.44)
|
|
||||||
coolNote.rating = "sick";
|
|
||||||
//goodNoteHit(coolNote, (mashing > getKeyPresses(coolNote)));
|
|
||||||
trace('force note hit');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, daNote);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, coolNote);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else // regular notes?
|
|
||||||
{
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
if (NearlyEquals(daNote.strumTime,rep.replay.keyPresses[repPresses].time, 30))
|
|
||||||
{
|
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
|
||||||
|
|
||||||
daNote.rating = Ratings.CalculateRating(noteDiff);
|
|
||||||
|
|
||||||
//goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
|
||||||
trace('force note hit');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, daNote);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
noteCheck(controlArray, daNote);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if (controlArray[daNote.noteData])
|
|
||||||
goodNoteHit(daNote);
|
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);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (daNote.wasGoodHit)
|
|
||||||
{
|
|
||||||
daNote.kill();
|
|
||||||
notes.remove(daNote, true);
|
|
||||||
daNote.destroy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// PRESSES, check for note hits
|
||||||
if ((up || right || down || left) && generatedMusic || (upHold || downHold || leftHold || rightHold) && loadRep && generatedMusic)
|
if (pressArray.contains(true) && /*!boyfriend.stunned && */ generatedMusic)
|
||||||
{
|
|
||||||
notes.forEachAlive(function(daNote:Note)
|
|
||||||
{
|
{
|
||||||
if (daNote.canBeHit && daNote.mustPress && daNote.isSustainNote)
|
boyfriend.holdTimer = 0;
|
||||||
|
|
||||||
|
var possibleNotes:Array<Note> = []; // notes that can be hit
|
||||||
|
var directionList:Array<Int> = []; // directions that can be hit
|
||||||
|
var dumbNotes:Array<Note> = []; // notes to kill later
|
||||||
|
|
||||||
|
notes.forEachAlive(function(daNote:Note)
|
||||||
{
|
{
|
||||||
switch (daNote.noteData)
|
if (daNote.canBeHit && daNote.mustPress && !daNote.tooLate && !daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
// NOTES YOU ARE HOLDING
|
if (directionList.contains(daNote.noteData))
|
||||||
case 2:
|
{
|
||||||
if (up || upHold)
|
for (coolNote in possibleNotes)
|
||||||
goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
{
|
||||||
case 3:
|
if (coolNote.noteData == daNote.noteData && Math.abs(daNote.strumTime - coolNote.strumTime) < 10)
|
||||||
if (right || rightHold)
|
{ // if it's the same note twice at < 10ms distance, just delete it
|
||||||
goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
// EXCEPT u cant delete it in this loop cuz it fucks with the collection lol
|
||||||
case 1:
|
dumbNotes.push(daNote);
|
||||||
if (down || downHold)
|
break;
|
||||||
goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
}
|
||||||
case 0:
|
else if (coolNote.noteData == daNote.noteData && daNote.strumTime < coolNote.strumTime)
|
||||||
if (left || leftHold)
|
{ // if daNote is earlier than existing note (coolNote), replace
|
||||||
goodNoteHit(daNote, (mashing > getKeyPresses(daNote)));
|
possibleNotes.remove(coolNote);
|
||||||
|
possibleNotes.push(daNote);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
possibleNotes.push(daNote);
|
||||||
|
directionList.push(daNote.noteData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
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));
|
||||||
|
|
||||||
|
var dontCheck = false;
|
||||||
|
|
||||||
|
for (i in 0...pressArray.length)
|
||||||
|
{
|
||||||
|
if (pressArray[i] && !directionList.contains(i))
|
||||||
|
dontCheck = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (perfectMode)
|
||||||
|
goodNoteHit(possibleNotes[0]);
|
||||||
|
else if (possibleNotes.length > 0 && !dontCheck)
|
||||||
|
{
|
||||||
|
for (coolNote in possibleNotes)
|
||||||
|
{
|
||||||
|
if (pressArray[coolNote.noteData])
|
||||||
|
{
|
||||||
|
if (mashViolations != 0)
|
||||||
|
mashViolations--;
|
||||||
|
scoreTxt.color = FlxColor.WHITE;
|
||||||
|
goodNoteHit(coolNote);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
if (dontCheck && possibleNotes.length > 0)
|
||||||
|
{
|
||||||
if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !up && !down && !right && !left)
|
if (mashViolations > 4)
|
||||||
{
|
{
|
||||||
if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss'))
|
trace('mash violations ' + mashViolations);
|
||||||
{
|
scoreTxt.color = FlxColor.RED;
|
||||||
boyfriend.playAnim('idle');
|
noteMiss(0,null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
mashViolations++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (boyfriend.holdTimer > Conductor.stepCrochet * 4 * 0.001 && !holdArray.contains(true))
|
||||||
|
{
|
||||||
|
if (boyfriend.animation.curAnim.name.startsWith('sing') && !boyfriend.animation.curAnim.name.endsWith('miss'))
|
||||||
|
{
|
||||||
|
boyfriend.playAnim('idle');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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 2:
|
if (!holdArray[spr.ID])
|
||||||
if (loadRep)
|
spr.animation.play('static');
|
||||||
{
|
|
||||||
/*if (upP)
|
|
||||||
{
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
new FlxTimer().start(Math.abs(rep.replay.keyPresses[repReleases].time - Conductor.songPosition) + 10, function(tmr:FlxTimer)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (upP && spr.animation.curAnim.name != 'confirm' && !loadRep)
|
|
||||||
{
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
trace('play');
|
|
||||||
}
|
|
||||||
if (upR)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
/*if (upP)
|
|
||||||
{
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
new FlxTimer().start(Math.abs(rep.replay.keyPresses[repReleases].time - Conductor.songPosition) + 10, function(tmr:FlxTimer)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rightP && spr.animation.curAnim.name != 'confirm' && !loadRep)
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
if (rightR)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
/*if (upP)
|
|
||||||
{
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
new FlxTimer().start(Math.abs(rep.replay.keyPresses[repReleases].time - Conductor.songPosition) + 10, function(tmr:FlxTimer)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (downP && spr.animation.curAnim.name != 'confirm' && !loadRep)
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
if (downR)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 0:
|
|
||||||
if (loadRep)
|
|
||||||
{
|
|
||||||
/*if (upP)
|
|
||||||
{
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
new FlxTimer().start(Math.abs(rep.replay.keyPresses[repReleases].time - Conductor.songPosition) + 10, function(tmr:FlxTimer)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (leftP && spr.animation.curAnim.name != 'confirm' && !loadRep)
|
|
||||||
spr.animation.play('pressed');
|
|
||||||
if (leftR)
|
|
||||||
{
|
|
||||||
spr.animation.play('static');
|
|
||||||
repReleases++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school'))
|
||||||
{
|
{
|
||||||
spr.centerOffsets();
|
spr.centerOffsets();
|
||||||
@ -3520,7 +3299,7 @@ class PlayState extends MusicBeatState
|
|||||||
else
|
else
|
||||||
spr.centerOffsets();
|
spr.centerOffsets();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function noteMiss(direction:Int = 1, daNote:Note):Void
|
function noteMiss(direction:Int = 1, daNote:Note):Void
|
||||||
{
|
{
|
||||||
@ -3534,11 +3313,11 @@ class PlayState extends MusicBeatState
|
|||||||
combo = 0;
|
combo = 0;
|
||||||
misses++;
|
misses++;
|
||||||
|
|
||||||
var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
//var noteDiff:Float = Math.abs(daNote.strumTime - Conductor.songPosition);
|
||||||
var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
|
//var wife:Float = EtternaFunctions.wife3(noteDiff, FlxG.save.data.etternaMode ? 1 : 1.7);
|
||||||
|
|
||||||
if (FlxG.save.data.accuracyMod == 1)
|
if (FlxG.save.data.accuracyMod == 1)
|
||||||
totalNotesHit += wife;
|
totalNotesHit -= 1;
|
||||||
|
|
||||||
songScore -= 10;
|
songScore -= 10;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user