Fixed android version / Smooth zoom
This commit is contained in:
@@ -14,7 +14,10 @@ import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.math.geom.Geometry;
|
||||
import io.anuke.arc.math.geom.Rectangle;
|
||||
import io.anuke.arc.math.geom.Vector2;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.arc.util.Align;
|
||||
import io.anuke.arc.util.Interval;
|
||||
import io.anuke.arc.util.Pack;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.arc.util.pooling.Pools;
|
||||
import io.anuke.mindustry.content.Mechs;
|
||||
import io.anuke.mindustry.content.fx.UnitFx;
|
||||
@@ -23,7 +26,6 @@ import io.anuke.mindustry.entities.traits.*;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.graphics.Trail;
|
||||
import io.anuke.mindustry.input.Binding;
|
||||
import io.anuke.mindustry.io.TypeIO;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
@@ -73,7 +75,6 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
private Queue<BuildRequest> placeQueue = new Queue<>();
|
||||
private Tile mining;
|
||||
private CarriableTrait carrying;
|
||||
private Trail trail = new Trail(12);
|
||||
private Vector2 movement = new Vector2();
|
||||
private boolean moved;
|
||||
|
||||
@@ -373,15 +374,6 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
if(dead) return;
|
||||
|
||||
drawBuilding(this);
|
||||
|
||||
if(mech.flying || boostHeat > 0.001f){
|
||||
float wobblyness = 0.6f;
|
||||
if(!state.isPaused()) trail.update(x + Angles.trnsx(rotation + 180f, 5f) + Mathf.range(wobblyness),
|
||||
y + Angles.trnsy(rotation + 180f, 5f) + Mathf.range(wobblyness));
|
||||
trail.draw(Tmp.c1.set(mech.trailColor).lerp(mech.trailColorTo, mech.flying ? 0f : boostHeat), 5f * (isFlying() ? 1f : boostHeat));
|
||||
}else{
|
||||
trail.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void drawName(){
|
||||
@@ -772,7 +764,6 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
||||
inventory.clear();
|
||||
placeQueue.clear();
|
||||
dead = true;
|
||||
trail.clear();
|
||||
target = null;
|
||||
moveTarget = null;
|
||||
carrier = null;
|
||||
|
||||
@@ -10,7 +10,6 @@ import io.anuke.mindustry.entities.Predict;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.traits.CarriableTrait;
|
||||
import io.anuke.mindustry.entities.traits.CarryTrait;
|
||||
import io.anuke.mindustry.graphics.Trail;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.type.AmmoType;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
@@ -20,9 +19,7 @@ import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
protected static Vector2 vec = new Vector2();
|
||||
protected static float wobblyness = 0.6f;
|
||||
|
||||
protected Trail trail = new Trail(8);
|
||||
protected CarriableTrait carrying;
|
||||
protected final UnitState
|
||||
|
||||
@@ -155,9 +152,6 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
updateRotation();
|
||||
wobble();
|
||||
}
|
||||
|
||||
trail.update(x + Angles.trnsx(rotation + 180f, 6f) + Mathf.range(wobblyness),
|
||||
y + Angles.trnsy(rotation + 180f, 6f) + Mathf.range(wobblyness));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -171,11 +165,6 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||
Draw.alpha(1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawOver(){
|
||||
trail.draw(type.trailColor, 5f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void behavior(){
|
||||
if(health <= health * type.retreatPercent && !isCommanded() &&
|
||||
|
||||
@@ -17,7 +17,6 @@ import io.anuke.mindustry.entities.units.UnitCommand;
|
||||
import io.anuke.mindustry.entities.units.UnitState;
|
||||
import io.anuke.mindustry.game.EventType.BuildSelectEvent;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.mindustry.type.ItemStack;
|
||||
import io.anuke.mindustry.type.ItemType;
|
||||
@@ -333,7 +332,6 @@ public class Drone extends FlyingUnit implements BuilderTrait{
|
||||
|
||||
@Override
|
||||
public void drawOver(){
|
||||
trail.draw(Palette.lightTrail, 3f);
|
||||
drawBuilding(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user