From 98c00679adb70984f319473b2bb31eba8409dfd6 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 11:20:01 +0200 Subject: [PATCH] readd delay for rekt --- .../opsudance/spinners/RektCircleSpinner.java | 18 ++++++++++++------ src/yugecin/opsudance/spinners/Spinner.java | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/yugecin/opsudance/spinners/RektCircleSpinner.java b/src/yugecin/opsudance/spinners/RektCircleSpinner.java index 706b0c92..8ec7b527 100644 --- a/src/yugecin/opsudance/spinners/RektCircleSpinner.java +++ b/src/yugecin/opsudance/spinners/RektCircleSpinner.java @@ -38,6 +38,12 @@ public class RektCircleSpinner extends Spinner { @Override public double[] getPoint() { + if( ++delay < DELAY ) + { + return point; + } + delay = 0; + final int INC = 50; if( index == 0 ) @@ -48,20 +54,20 @@ public class RektCircleSpinner extends Spinner { } else if( index == 1 ) { - point[0] = Options.width / 2d - size / 2d; - point[1] = Options.height / 2d - size / 2d + pos; + point[0] = Options.width / 2 - size / 2; + point[1] = Options.height / 2 - size / 2 + pos; index++; } else if( index == 2 ) { - point[0] = Options.width / 2d - size / 2d + pos; - point[1] = Options.height / 2d + size / 2d; + point[0] = Options.width / 2 - size / 2 + pos; + point[1] = Options.height / 2 + size / 2; index++; } else if( index == 3 ) { - point[0] = Options.width / 2d + size / 2d; - point[1] = Options.height / 2d + size / 2d - pos; + point[0] = Options.width / 2 + size / 2; + point[1] = Options.height / 2 + size / 2 - pos; pos += INC; if( pos > size ) { diff --git a/src/yugecin/opsudance/spinners/Spinner.java b/src/yugecin/opsudance/spinners/Spinner.java index 3a2f7685..754b9b65 100644 --- a/src/yugecin/opsudance/spinners/Spinner.java +++ b/src/yugecin/opsudance/spinners/Spinner.java @@ -22,6 +22,7 @@ public abstract class Spinner { private double[][] points; private int length; private int index; + public static int DELAY = 3; public abstract void init();