got rid of dependency injection, it doesn't add anything at this point and only slows down things and makes a mess. Also some refactoring.

This commit is contained in:
yugecin
2017-05-21 11:12:55 +02:00
parent 1ebf2c2dcb
commit ec53f531c8
72 changed files with 675 additions and 929 deletions

View File

@@ -37,8 +37,8 @@ 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;
import static yugecin.opsudance.core.InstanceContainer.*;
import static yugecin.opsudance.options.Options.*;
/**
@@ -316,7 +316,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 < GameObjectRenderer.instance.getCircleDiameter() / 8) {
if (dist < gameObjectRenderer.circleDiameter / 8) {
x = (float) (x - diff_x / 2);
y = (float) (y - diff_y / 2);
} else {