Added pretty much everything suggested to hit animations
This commit is contained in:
@@ -138,7 +138,7 @@ public class Circle implements HitObject {
|
||||
|
||||
if (result > -1) {
|
||||
data.addHitError(hitObject.getTime(), x, y, timeDiff);
|
||||
data.hitResult(hitObject.getTime(), result, this.x, this.y, color, comboEnd, hitObject, 0);
|
||||
data.hitResult(hitObject.getTime(), result, this.x, this.y, color, comboEnd, hitObject, 0, HitResultType.CIRCLE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -154,17 +154,17 @@ public class Circle implements HitObject {
|
||||
|
||||
if (overlap || trackPosition > time + hitResultOffset[GameData.HIT_50]) {
|
||||
if (isAutoMod) // "auto" mod: catch any missed notes due to lag
|
||||
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, 0);
|
||||
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, 0, HitResultType.CIRCLE);
|
||||
|
||||
else // no more points can be scored, so send a miss
|
||||
data.hitResult(time, GameData.HIT_MISS, x, y, null, comboEnd, hitObject, 0);
|
||||
data.hitResult(time, GameData.HIT_MISS, x, y, null, comboEnd, hitObject, 0, HitResultType.CIRCLE);
|
||||
return true;
|
||||
}
|
||||
|
||||
// "auto" mod: send a perfect hit result
|
||||
else if (isAutoMod) {
|
||||
if (Math.abs(trackPosition - time) < hitResultOffset[GameData.HIT_300]) {
|
||||
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, 0);
|
||||
data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, 0, HitResultType.CIRCLE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
10
src/itdelatrisu/opsu/objects/HitResultType.java
Normal file
10
src/itdelatrisu/opsu/objects/HitResultType.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package itdelatrisu.opsu.objects;
|
||||
|
||||
public enum HitResultType {
|
||||
CIRCLE,
|
||||
SLIDERSTART,
|
||||
SLIDERTICK,
|
||||
SLIDEREND,
|
||||
SLIDEREND_FIRSTOBJECT,
|
||||
SPINNER
|
||||
}
|
||||
@@ -278,14 +278,13 @@ public class Slider implements HitObject {
|
||||
else
|
||||
result = GameData.HIT_MISS;
|
||||
|
||||
if (currentRepeats % 2 == 0) { // last circle
|
||||
float[] lastPos = curve.pointAt(1);
|
||||
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
|
||||
lastPos[0], lastPos[1], color, comboEnd, hitObject, currentRepeats + 1);
|
||||
} else { // first circle
|
||||
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
|
||||
x, y, color, comboEnd, hitObject, currentRepeats + 1);
|
||||
}
|
||||
float[] lastPos = curve.pointAt(1);
|
||||
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
|
||||
x, y, color, comboEnd, hitObject, currentRepeats + 1,
|
||||
currentRepeats % 2 == 0 ? HitResultType.SLIDEREND_FIRSTOBJECT : HitResultType.SLIDEREND);
|
||||
data.hitResult(hitObject.getTime() + (int) sliderTimeTotal, result,
|
||||
lastPos[0], lastPos[1], color, comboEnd, hitObject, currentRepeats + 1,
|
||||
currentRepeats % 2 == 0 ? HitResultType.SLIDEREND : HitResultType.SLIDEREND_FIRSTOBJECT);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public class Spinner implements HitObject {
|
||||
result = GameData.HIT_MISS;
|
||||
|
||||
data.hitResult(hitObject.getEndTime(), result, width / 2, height / 2,
|
||||
Color.transparent, true, hitObject, 0);
|
||||
Color.transparent, true, hitObject, 0, HitResultType.SPINNER);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user