Minor graphical updates and code cleaning.
- Padded game score display, and always display 2 digits in front of the decimal (e.g. 00.00% instead of 0.00%). - Keep map progress circle at a fixed location instead of basing it off the score length. - Moved some track resets (pause + restart at preview) to trigger upon loading the song menu. Fixes weird behaviors when leaving the game state. - Cleaned up trailing whitespace and added missing overrides. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -90,6 +90,7 @@ public class Circle implements HitObject {
|
||||
this.comboEnd = comboEnd;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(int trackPosition, boolean currentObject, Graphics g) {
|
||||
int timeDiff = hitObject.getTime() - trackPosition;
|
||||
|
||||
@@ -133,6 +134,7 @@ public class Circle implements HitObject {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mousePressed(int x, int y) {
|
||||
double distance = Math.hypot(hitObject.getX() - x, hitObject.getY() - y);
|
||||
int circleRadius = GameImage.HITCIRCLE.getImage().getWidth() / 2;
|
||||
@@ -150,6 +152,7 @@ public class Circle implements HitObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(boolean overlap, int delta, int mouseX, int mouseY) {
|
||||
int time = hitObject.getTime();
|
||||
float x = hitObject.getX(), y = hitObject.getY();
|
||||
@@ -162,7 +165,7 @@ public class Circle implements HitObject {
|
||||
if (overlap || trackPosition > time + hitResultOffset[GameScore.HIT_50]) {
|
||||
if (isAutoMod) // "auto" mod: catch any missed notes due to lag
|
||||
score.hitResult(time, GameScore.HIT_300, x, y, color, comboEnd, hitSound);
|
||||
|
||||
|
||||
else // no more points can be scored, so send a miss
|
||||
score.hitResult(time, GameScore.HIT_MISS, x, y, null, comboEnd, hitSound);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user