30 lines
971 B
Haxe
30 lines
971 B
Haxe
class Ratings
|
|
{
|
|
public static function CalculateRating(noteDiff:Float, ?customSafeZone:Float):String
|
|
{
|
|
|
|
var customTimeScale = Conductor.timeScale;
|
|
|
|
if (customSafeZone != null)
|
|
customTimeScale = customSafeZone / 166;
|
|
|
|
// trace(customTimeScale + ' vs ' + Conductor.timeScale);
|
|
|
|
// I HATE THIS IF CONDITION
|
|
// IF LEMON SEES THIS I'M SORRY :(
|
|
|
|
if (noteDiff > 135 * customTimeScale) // way early
|
|
return "shit";
|
|
else if (noteDiff > 90 * customTimeScale) // early
|
|
return "bad";
|
|
else if (noteDiff > 45 * customTimeScale) // your kinda there
|
|
return "good";
|
|
else if (noteDiff < -45 * customTimeScale) // little late
|
|
return "good";
|
|
else if (noteDiff < -90 * customTimeScale) // late
|
|
return "bad";
|
|
else if (noteDiff < -135 * customTimeScale) // late as fuck
|
|
return "shit";
|
|
return "sick";
|
|
}
|
|
} |