readd delay for rekt

This commit is contained in:
yugecin 2016-10-01 11:20:01 +02:00
parent 0c7fa96ae3
commit 98c00679ad
2 changed files with 13 additions and 6 deletions

View File

@ -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 )
{

View File

@ -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();