Various tweaks

This commit is contained in:
Anuken 2020-05-19 17:49:25 -04:00
parent 4edd024015
commit 945be0c524
37 changed files with 623 additions and 610 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

View File

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View File

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 490 B

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 927 B

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

View File

Before

Width:  |  Height:  |  Size: 455 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

View File

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View File

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

View File

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 465 B

View File

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 723 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 KiB

After

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 KiB

After

Width:  |  Height:  |  Size: 837 KiB

View File

@ -29,7 +29,6 @@ public class UnitTypes implements ContentList{
dagger = new UnitType("dagger"){{
speed = 0.5f;
drag = 0.3f;
hitsize = 8f;
mass = 1.75f;
health = 130;
@ -44,7 +43,6 @@ public class UnitTypes implements ContentList{
titan = new UnitType("titan"){{
speed = 0.4f;
drag = 0.3f;
mass = 3.5f;
hitsize = 9f;
range = 10f;
@ -66,7 +64,6 @@ public class UnitTypes implements ContentList{
crawler = new UnitType("crawler"){{
speed = 0.65f;
drag = 0.3f;
hitsize = 8f;
mass = 1.75f;
health = 120;
@ -89,10 +86,8 @@ public class UnitTypes implements ContentList{
fortress = new UnitType("fortress"){{
speed = 0.38f;
speed = 0.15f;
drag = 0.4f;
mass = 5f;
hitsize = 10f;
hitsize = 13f;
rotateSpeed = 3f;
targetAir = false;
health = 750;
@ -113,7 +108,7 @@ public class UnitTypes implements ContentList{
speed = 0.4f;
drag = 0.4f;
mass = 5f;
hitsize = 9f;
hitsize = 10f;
rotateSpeed = 3f;
targetAir = false;
health = 600;
@ -681,7 +676,7 @@ public class UnitTypes implements ContentList{
engineColor = Color.valueOf("feb380");
health = 350f;
buildSpeed = 1.5f;
weapons.add(new Weapon("swarmer"){{
weapons.add(new Weapon("missiles"){{
length = 1.5f;
recoil = 4f;
reload = 38f;

View File

@ -16,6 +16,6 @@ abstract class LegsComp implements Posc, Flyingc, Hitboxc, Unitc, Legsc, Elevati
public void update(){
float len = vel().len();
baseRotation = Angles.moveToward(baseRotation, vel().angle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
walkTime += Time.delta()*len*2f;
walkTime += Time.delta()*len;
}
}

View File

@ -6,6 +6,7 @@ import arc.func.*;
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.math.geom.*;
import arc.scene.ui.layout.*;
import arc.struct.*;
import arc.util.ArcAnnotate.*;
@ -24,6 +25,7 @@ import static mindustry.Vars.*;
public class UnitType extends UnlockableContent{
public static final float shadowTX = -12, shadowTY = -13, shadowColor = Color.toFloatBits(0, 0, 0, 0.22f);
private static final Vec2 legOffset = new Vec2();
public boolean flying;
public @NonNull Prov<? extends Unitc> constructor;
@ -115,6 +117,8 @@ public class UnitType extends UnlockableContent{
//region drawing
public void draw(Unitc unit){
Legsc legs = unit instanceof Legsc ? (Legsc)unit : null;
if(unit.controller().isBeingControlled(player.unit())){
drawControl(unit);
}
@ -127,8 +131,13 @@ public class UnitType extends UnlockableContent{
float z = Mathf.lerp(Layer.groundUnit, Layer.flyingUnit, unit.elevation());
Draw.z(z - 0.02f);
if(unit instanceof Legsc){
drawLegs((Legsc)unit);
if(legs != null){
drawLegs(legs);
float ft = Mathf.sin(legs.walkTime(), 3f, 3f);
legOffset.trns(legs.baseRotation(), 0f, ft * 0.18f);
unit.trns(legOffset.x, legOffset.y);
}
Draw.z(z - 0.01f);
@ -145,6 +154,10 @@ public class UnitType extends UnlockableContent{
if(unit.shieldAlpha() > 0){
drawShield(unit);
}
if(legs != null){
unit.trns(-legOffset.x, -legOffset.y);
}
}
public void drawShield(Unitc unit){
@ -291,7 +304,8 @@ public class UnitType extends UnlockableContent{
Draw.mixcol(Color.white, unit.hitTime());
float ft = Mathf.sin(unit.walkTime(), 6f, 2f + unit.hitSize() / 15f);
float sin = Mathf.sin(unit.walkTime(), 3f, 1f);
float ft = sin*(2.5f + (unit.hitSize()-8f)/2f);
Floor floor = unit.floorOn();
@ -300,11 +314,15 @@ public class UnitType extends UnlockableContent{
}
for(int i : Mathf.signs){
//Draw.mixcol(Color.valueOf("989aa4"), Math.max(sin * i, 0));
Draw.rect(legRegion,
unit.x() + Angles.trnsx(unit.baseRotation(), ft * i),
unit.y() + Angles.trnsy(unit.baseRotation(), ft * i),
legRegion.getWidth() * i * Draw.scl, legRegion.getHeight() * Draw.scl - Mathf.clamp(ft * i, 0, 2), unit.baseRotation() - 90);
legRegion.getWidth() * i * Draw.scl,
legRegion.getHeight() * Draw.scl - Math.max(-sin * i, 0) * legRegion.getHeight() * 0.5f * Draw.scl,
unit.baseRotation() - 90);
}
//Draw.mixcol();
if(floor.isLiquid){
Draw.color(Color.white, floor.mapColor, unit.drownTime() * 0.4f);

View File

@ -328,7 +328,7 @@ public class PlacementFragment extends Fragment{
topTable.row();
topTable.table(b -> {
b.image(Icon.cancel).padRight(2).color(Color.scarlet);
b.add(!player.isBuilder() ? "$unit.nobuild" : "$banned");
b.add(!player.isBuilder() ? "$unit.nobuild" : "$banned").width(190f).wrap();
b.left();
}).padTop(2).left();
}