put common hitcircle render code in separate class

This commit is contained in:
yugecin
2017-03-04 14:26:55 +01:00
parent c3e6826464
commit 2e3a782fdc
9 changed files with 164 additions and 73 deletions

View File

@@ -21,7 +21,6 @@ import itdelatrisu.opsu.GameImage;
import itdelatrisu.opsu.Options;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.beatmap.HitObject;
import itdelatrisu.opsu.objects.Circle;
import itdelatrisu.opsu.objects.curves.Vec2f;
import java.nio.ByteBuffer;
@@ -37,6 +36,7 @@ import org.lwjgl.opengl.GL20;
import org.newdawn.slick.Color;
import org.newdawn.slick.Image;
import org.newdawn.slick.util.Log;
import yugecin.opsudance.render.GameObjectRenderer;
/**
* Hold the temporary render state that needs to be restored again after the new
@@ -303,7 +303,7 @@ public class CurveRenderState {
double diff_x = x - last_x;
double diff_y = y - last_y;
float dist = Utils.distance(x, y, last_x, last_y);
if (dist < Circle.diameter / 8) {
if (dist < GameObjectRenderer.instance.getCircleDiameter() / 8) {
x = (float) (x - diff_x / 2);
y = (float) (y - diff_y / 2);
} else {