More plugin customization / Renamed Rectangle

This commit is contained in:
Anuken
2019-12-26 22:44:15 -05:00
parent 6080a7e4bc
commit d6d6dc29dc
35 changed files with 166 additions and 90 deletions

View File

@@ -864,7 +864,7 @@ public class Block extends BlockStorage{
return ((size + 1) % 2) * tilesize / 2f;
}
public Rectangle bounds(int x, int y, Rectangle rect){
public Rect bounds(int x, int y, Rect rect){
return rect.setSize(size * tilesize).setCenter(x * tilesize + offset(), y * tilesize + offset());
}

View File

@@ -327,7 +327,7 @@ public class Tile implements Position, TargetTrait{
return tmpArray;
}
public Rectangle getHitbox(Rectangle rect){
public Rect getHitbox(Rect rect){
return rect.setSize(block().size * tilesize).setCenter(drawx(), drawy());
}

View File

@@ -15,8 +15,8 @@ public class DeflectorWall extends Wall{
public static final float hitTime = 10f;
protected float maxDamageDeflect = 10f;
protected Rectangle rect = new Rectangle();
protected Rectangle rect2 = new Rectangle();
protected Rect rect = new Rect();
protected Rect rect2 = new Rect();
public DeflectorWall(String name){
super(name);

View File

@@ -18,7 +18,7 @@ import java.io.*;
import static mindustry.Vars.*;
public class Door extends Wall{
protected final static Rectangle rect = new Rectangle();
protected final static Rect rect = new Rect();
public final int timerToggle = timers++;
public Effect openfx = Fx.dooropen;

View File

@@ -6,7 +6,7 @@ import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Angles;
import arc.math.Mathf;
import arc.math.geom.Rectangle;
import arc.math.geom.Rect;
import arc.util.Time;
import mindustry.entities.Units;
import mindustry.entities.type.TileEntity;
@@ -19,7 +19,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.tilesize;
public class RepairPoint extends Block{
private static Rectangle rect = new Rectangle();
private static Rect rect = new Rect();
public int timerTarget = timers++;