Various tweaks
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 464 B |
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 354 B |
BIN
core/assets-raw/sprites/weapons/artillery.png
Normal file
|
After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 709 B After Width: | Height: | Size: 709 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 927 B |
BIN
core/assets-raw/sprites/weapons/eruption.png
Normal file
|
After Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 455 B |
BIN
core/assets-raw/sprites/weapons/flamethrower.png
Normal file
|
After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 470 B |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 740 KiB After Width: | Height: | Size: 737 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 836 KiB After Width: | Height: | Size: 837 KiB |
@@ -29,7 +29,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
dagger = new UnitType("dagger"){{
|
dagger = new UnitType("dagger"){{
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
drag = 0.3f;
|
|
||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
mass = 1.75f;
|
mass = 1.75f;
|
||||||
health = 130;
|
health = 130;
|
||||||
@@ -44,7 +43,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
titan = new UnitType("titan"){{
|
titan = new UnitType("titan"){{
|
||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
drag = 0.3f;
|
|
||||||
mass = 3.5f;
|
mass = 3.5f;
|
||||||
hitsize = 9f;
|
hitsize = 9f;
|
||||||
range = 10f;
|
range = 10f;
|
||||||
@@ -66,7 +64,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
crawler = new UnitType("crawler"){{
|
crawler = new UnitType("crawler"){{
|
||||||
speed = 0.65f;
|
speed = 0.65f;
|
||||||
drag = 0.3f;
|
|
||||||
hitsize = 8f;
|
hitsize = 8f;
|
||||||
mass = 1.75f;
|
mass = 1.75f;
|
||||||
health = 120;
|
health = 120;
|
||||||
@@ -89,10 +86,8 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
fortress = new UnitType("fortress"){{
|
fortress = new UnitType("fortress"){{
|
||||||
speed = 0.38f;
|
speed = 0.38f;
|
||||||
speed = 0.15f;
|
|
||||||
drag = 0.4f;
|
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
hitsize = 10f;
|
hitsize = 13f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
health = 750;
|
health = 750;
|
||||||
@@ -113,7 +108,7 @@ public class UnitTypes implements ContentList{
|
|||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
mass = 5f;
|
mass = 5f;
|
||||||
hitsize = 9f;
|
hitsize = 10f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
health = 600;
|
health = 600;
|
||||||
@@ -681,7 +676,7 @@ public class UnitTypes implements ContentList{
|
|||||||
engineColor = Color.valueOf("feb380");
|
engineColor = Color.valueOf("feb380");
|
||||||
health = 350f;
|
health = 350f;
|
||||||
buildSpeed = 1.5f;
|
buildSpeed = 1.5f;
|
||||||
weapons.add(new Weapon("swarmer"){{
|
weapons.add(new Weapon("missiles"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
recoil = 4f;
|
recoil = 4f;
|
||||||
reload = 38f;
|
reload = 38f;
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ abstract class LegsComp implements Posc, Flyingc, Hitboxc, Unitc, Legsc, Elevati
|
|||||||
public void update(){
|
public void update(){
|
||||||
float len = vel().len();
|
float len = vel().len();
|
||||||
baseRotation = Angles.moveToward(baseRotation, vel().angle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
|
baseRotation = Angles.moveToward(baseRotation, vel().angle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed));
|
||||||
walkTime += Time.delta()*len*2f;
|
walkTime += Time.delta()*len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.func.*;
|
|||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import arc.math.geom.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.ArcAnnotate.*;
|
||||||
@@ -24,6 +25,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
public class UnitType extends UnlockableContent{
|
public class UnitType extends UnlockableContent{
|
||||||
public static final float shadowTX = -12, shadowTY = -13, shadowColor = Color.toFloatBits(0, 0, 0, 0.22f);
|
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 boolean flying;
|
||||||
public @NonNull Prov<? extends Unitc> constructor;
|
public @NonNull Prov<? extends Unitc> constructor;
|
||||||
@@ -115,6 +117,8 @@ public class UnitType extends UnlockableContent{
|
|||||||
//region drawing
|
//region drawing
|
||||||
|
|
||||||
public void draw(Unitc unit){
|
public void draw(Unitc unit){
|
||||||
|
Legsc legs = unit instanceof Legsc ? (Legsc)unit : null;
|
||||||
|
|
||||||
if(unit.controller().isBeingControlled(player.unit())){
|
if(unit.controller().isBeingControlled(player.unit())){
|
||||||
drawControl(unit);
|
drawControl(unit);
|
||||||
}
|
}
|
||||||
@@ -127,8 +131,13 @@ public class UnitType extends UnlockableContent{
|
|||||||
float z = Mathf.lerp(Layer.groundUnit, Layer.flyingUnit, unit.elevation());
|
float z = Mathf.lerp(Layer.groundUnit, Layer.flyingUnit, unit.elevation());
|
||||||
|
|
||||||
Draw.z(z - 0.02f);
|
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);
|
Draw.z(z - 0.01f);
|
||||||
@@ -145,6 +154,10 @@ public class UnitType extends UnlockableContent{
|
|||||||
if(unit.shieldAlpha() > 0){
|
if(unit.shieldAlpha() > 0){
|
||||||
drawShield(unit);
|
drawShield(unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(legs != null){
|
||||||
|
unit.trns(-legOffset.x, -legOffset.y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawShield(Unitc unit){
|
public void drawShield(Unitc unit){
|
||||||
@@ -291,7 +304,8 @@ public class UnitType extends UnlockableContent{
|
|||||||
|
|
||||||
Draw.mixcol(Color.white, unit.hitTime());
|
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();
|
Floor floor = unit.floorOn();
|
||||||
|
|
||||||
@@ -300,11 +314,15 @@ public class UnitType extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(int i : Mathf.signs){
|
for(int i : Mathf.signs){
|
||||||
|
//Draw.mixcol(Color.valueOf("989aa4"), Math.max(sin * i, 0));
|
||||||
Draw.rect(legRegion,
|
Draw.rect(legRegion,
|
||||||
unit.x() + Angles.trnsx(unit.baseRotation(), ft * i),
|
unit.x() + Angles.trnsx(unit.baseRotation(), ft * i),
|
||||||
unit.y() + Angles.trnsy(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){
|
if(floor.isLiquid){
|
||||||
Draw.color(Color.white, floor.mapColor, unit.drownTime() * 0.4f);
|
Draw.color(Color.white, floor.mapColor, unit.drownTime() * 0.4f);
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
topTable.row();
|
topTable.row();
|
||||||
topTable.table(b -> {
|
topTable.table(b -> {
|
||||||
b.image(Icon.cancel).padRight(2).color(Color.scarlet);
|
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();
|
b.left();
|
||||||
}).padTop(2).left();
|
}).padTop(2).left();
|
||||||
}
|
}
|
||||||
|
|||||||