don't pass deltas as param
This commit is contained in:
@@ -22,8 +22,8 @@ import yugecin.opsudance.core.errorhandling.ErrorDumpable;
|
||||
|
||||
public interface OpsuState extends ErrorDumpable {
|
||||
|
||||
void update(int delta);
|
||||
void preRenderUpdate(int delta);
|
||||
void update();
|
||||
void preRenderUpdate();
|
||||
void render(Graphics g);
|
||||
void enter();
|
||||
void leave();
|
||||
|
||||
@@ -66,11 +66,11 @@ public class BarNotificationState implements EventListener<BarNotificationEvent>
|
||||
});
|
||||
}
|
||||
|
||||
public void render(Graphics g, int delta) {
|
||||
public void render(Graphics g) {
|
||||
if (timeShown >= TOTAL_TIME) {
|
||||
return;
|
||||
}
|
||||
timeShown += delta;
|
||||
timeShown += displayContainer.renderDelta;
|
||||
processAnimations();
|
||||
g.setColor(bgcol);
|
||||
g.fillRect(0, displayContainer.height / 2 - barHalfHeight, displayContainer.width, barHalfHeight * 2);
|
||||
|
||||
@@ -57,12 +57,12 @@ public class BubbleNotificationState implements EventListener<BubbleNotification
|
||||
});
|
||||
}
|
||||
|
||||
public void render(Graphics g, int delta) {
|
||||
public void render(Graphics g) {
|
||||
ListIterator<Notification> iter = bubbles.listIterator();
|
||||
if (!iter.hasNext()) {
|
||||
return;
|
||||
}
|
||||
addAnimationTime += delta;
|
||||
addAnimationTime += displayContainer.renderDelta;
|
||||
if (addAnimationTime > IN_TIME) {
|
||||
finishAddAnimation();
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class BubbleNotificationState implements EventListener<BubbleNotification
|
||||
if (animateUp && addAnimationTime < IN_TIME) {
|
||||
next.y = next.baseY - (int) (addAnimationHeight * AnimationEquation.OUT_QUINT.calc((float) addAnimationTime / IN_TIME));
|
||||
}
|
||||
if (next.render(g, displayContainer.mouseX, displayContainer.mouseY, delta)) {
|
||||
if (next.render(g, displayContainer.mouseX, displayContainer.mouseY, displayContainer.renderDelta)) {
|
||||
iter.remove();
|
||||
}
|
||||
animateUp = true;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class FpsRenderState implements EventListener<ResolutionChangedEvent> {
|
||||
|
||||
public void render(Graphics g) {
|
||||
int x = this.x;
|
||||
x = drawText(g, (1000 / displayContainer.realRenderInterval) + " fps", x, this.y);
|
||||
x = drawText(g, (1000 / displayContainer.renderDelta) + " fps", x, this.y);
|
||||
drawText(g, (1000 / displayContainer.delta) + " ups", x, this.y);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,16 +49,17 @@ public abstract class TransitionState extends BaseOpsuState {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(int delta) {
|
||||
applicableState.update(delta);
|
||||
transitionTime += delta;
|
||||
public void update() {
|
||||
applicableState.update();
|
||||
transitionTime += displayContainer.delta;
|
||||
if (transitionTime >= transitionTargetTime) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preRenderUpdate(int delta) {
|
||||
public void preRenderUpdate() {
|
||||
applicableState.preRenderUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user