More cleanup

This commit is contained in:
Anuken
2019-12-25 11:16:54 -05:00
parent 514d4817c8
commit 475794640d
47 changed files with 117 additions and 117 deletions
@@ -52,7 +52,7 @@ public class DeflectorWall extends Wall{
bullet.hitbox(rect2);
Vector2 position = Geometry.raycastRect(bullet.x - bullet.velocity().x*Time.delta(), bullet.y - bullet.velocity().y*Time.delta(), bullet.x + bullet.velocity().x*Time.delta(), bullet.y + bullet.velocity().y*Time.delta(),
Vec2 position = Geometry.raycastRect(bullet.x - bullet.velocity().x*Time.delta(), bullet.y - bullet.velocity().y*Time.delta(), bullet.x + bullet.velocity().x*Time.delta(), bullet.y + bullet.velocity().y*Time.delta(),
rect.setSize(size * tilesize + rect2.width*2 + rect2.height*2).setCenter(entity.x, entity.y));
if(position != null){
@@ -1,7 +1,7 @@
package mindustry.world.blocks.defense.turrets;
import arc.math.Mathf;
import arc.math.geom.Vector2;
import arc.math.geom.Vec2;
import mindustry.entities.Predict;
import mindustry.entities.type.Bullet;
import mindustry.entities.bullet.BulletType;
@@ -31,7 +31,7 @@ public class ArtilleryTurret extends ItemTurret{
tr.trns(entity.rotation, size * tilesize / 2);
Vector2 predict = Predict.intercept(tile, entity.target, type.speed);
Vec2 predict = Predict.intercept(tile, entity.target, type.speed);
float dst = entity.dst(predict.x, predict.y);
float maxTraveled = type.lifetime * type.speed;
@@ -10,7 +10,7 @@ import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Angles;
import arc.math.Mathf;
import arc.math.geom.Vector2;
import arc.math.geom.Vec2;
import arc.util.Time;
import mindustry.content.Fx;
import mindustry.entities.*;
@@ -54,8 +54,8 @@ public abstract class Turret extends Block{
public boolean targetAir = true;
public boolean targetGround = true;
protected Vector2 tr = new Vector2();
protected Vector2 tr2 = new Vector2();
protected Vec2 tr = new Vec2();
protected Vec2 tr2 = new Vec2();
public TextureRegion baseRegion, heatRegion;
@@ -162,7 +162,7 @@ public abstract class Turret extends Block{
float speed = type.speed;
if(speed < 0.1f) speed = 9999999f;
Vector2 result = Predict.intercept(entity, entity.target, speed);
Vec2 result = Predict.intercept(entity, entity.target, speed);
if(result.isZero()){
result.set(entity.target.getX(), entity.target.getY());
}
@@ -28,8 +28,8 @@ public class Conveyor extends Block implements Autotiler{
private static ItemPos drawpos = new ItemPos();
private static ItemPos pos1 = new ItemPos();
private static ItemPos pos2 = new ItemPos();
private final Vector2 tr1 = new Vector2();
private final Vector2 tr2 = new Vector2();
private final Vec2 tr1 = new Vec2();
private final Vec2 tr2 = new Vec2();
private TextureRegion[][] regions = new TextureRegion[7][4];
public float speed = 0f;
@@ -283,7 +283,7 @@ public class Conveyor extends Block implements Autotiler{
}
@Override
public void getStackOffset(Item item, Tile tile, Vector2 trns){
public void getStackOffset(Item item, Tile tile, Vec2 trns){
trns.trns(tile.rotation() * 90 + 180f, tilesize / 2f);
}
@@ -142,7 +142,7 @@ public class MessageBlock extends Block{
@Override
public void updateTableAlign(Tile tile, Table table){
Vector2 pos = Core.input.mouseScreen(tile.drawx(), tile.drawy() + tile.block().size * tilesize / 2f + 1);
Vec2 pos = Core.input.mouseScreen(tile.drawx(), tile.drawy() + tile.block().size * tilesize / 2f + 1);
table.setPosition(pos.x, pos.y, Align.bottom);
}
@@ -24,7 +24,7 @@ import static mindustry.Vars.*;
public class NuclearReactor extends PowerGenerator{
public final int timerFuel = timers++;
public final Vector2 tr = new Vector2();
public final Vec2 tr = new Vec2();
public Color lightColor = Color.valueOf("7f19ea");
public Color coolColor = new Color(1, 1, 1, 0f);
@@ -22,7 +22,7 @@ public class PowerNode extends PowerBlock{
protected static boolean returnValue = false;
protected final ObjectSet<PowerGraph> graphs = new ObjectSet<>();
protected final Vector2 t1 = new Vector2(), t2 = new Vector2();
protected final Vec2 t1 = new Vec2(), t2 = new Vec2();
public TextureRegion laser, laserEnd;
public float laserRange = 6;