All T3s done / New third map

This commit is contained in:
Anuken 2022-02-04 18:09:26 -05:00
parent c8da241825
commit 0441f89529
9 changed files with 30 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

View File

@ -123,7 +123,7 @@ public class SectorPresets{
difficulty = 3;
}};
three = new SectorPreset("three", erekir, 32){{
three = new SectorPreset("three", erekir, 36){{
captureWave = 8;
difficulty = 5;
}};

View File

@ -2821,6 +2821,7 @@ public class UnitTypes{
reload = 30f;
shake = 3f;
cooldownTime = 20f;
layerOffset = 0.02f;
shots = 3;
shotDelay = 3f;
@ -2828,6 +2829,22 @@ public class UnitTypes{
velocityRnd = 0.1f;
heatColor = Color.red;
for(int i = 0; i < 3; i++){
int fi = i;
parts.add(new RegionPart("-blade"){{
under = true;
layerOffset = -0.001f;
heatColor = Pal.techBlue;
heatProgress = PartProgress.heat.add(0.2f).min(PartProgress.warmup);
progress = PartProgress.warmup.blend(PartProgress.reload, 0.2f);
x = 11 / 4f;
y = 10f / 4f;
moveY = 1f - fi * 3f;
moveX = fi * 0.5f;
rotMove = -30f - fi * 15f;
}});
}
bullet = new BasicBulletType(9f, 75){{
pierceCap = 2;
pierceBuilding = true;
@ -3052,7 +3069,7 @@ public class UnitTypes{
mirror = false;
reload = 1f;
shootOnDeath = true;
bullet = new ExplosionBulletType(135f, 25f){{
bullet = new ExplosionBulletType(145f, 25f){{
suppressionRange = 140f;
shootEffect = new ExplosionEffect(){{
lifetime = 50f;

View File

@ -21,7 +21,7 @@ public abstract class DrawPart{
//TODO document
public float warmup, reload, smoothReload, heat, life;
public float x, y, rotation;
public int sideOverride = -1;
public int sideOverride = -1, sideMultiplier = 1;
public PartParams set(float warmup, float reload, float smoothReload, float heat, float x, float y, float rotation){
this.warmup = warmup;
@ -33,6 +33,7 @@ public abstract class DrawPart{
this.rotation = rotation;
this.sideOverride = -1;
this.life = 0f;
this.sideMultiplier = 1;
return this;
}
}

View File

@ -70,7 +70,7 @@ public class RegionPart extends DrawPart{
//can be null
var region = drawRegion ? regions[Math.min(i, regions.length - 1)] : null;
float sign = i == 1 ? -1 : 1;
float sign = (i == 0 ? 1 : -1) * params.sideMultiplier;
Tmp.v1.set((x + moveX * prog) * sign, y + moveY * prog).rotate(params.rotation - 90);
float
@ -78,7 +78,7 @@ public class RegionPart extends DrawPart{
ry = params.y + Tmp.v1.y,
rot = rotMove * prog * sign + params.rotation - 90;
Draw.xscl = i == 0 ? 1 : -1;
Draw.xscl = sign;
if(outline && drawRegion){
Draw.z(prevZ + outlineLayerOffset);
@ -112,10 +112,12 @@ public class RegionPart extends DrawPart{
if(children.size > 0){
for(int s = 0; s < len; s++){
int i = (params.sideOverride == -1 ? s : params.sideOverride);
float sign = i == 1 ? -1 : 1;
float sign = (i == 1 ? -1 : 1) * params.sideMultiplier;
Tmp.v1.set((x + moveX * prog) * sign, y + moveY * prog).rotate(params.rotation - 90);
childParam.set(params.warmup, params.reload, params.smoothReload, params.heat, params.x + Tmp.v1.x, params.y + Tmp.v1.y, i * sign + rotMove * prog * sign + params.rotation);
childParam.sideMultiplier = params.sideMultiplier;
childParam.life = params.life;
childParam.sideOverride = i;
for(var child : children){
child.draw(childParam);

View File

@ -32,7 +32,7 @@ public class ShapePart extends DrawPart{
//use specific side if necessary
int i = params.sideOverride == -1 ? s : params.sideOverride;
float sign = i == 1 ? -1 : 1;
float sign = (i == 0 ? 1 : -1) * params.sideMultiplier;
Tmp.v1.set((x + moveX * prog) * sign, y + moveY * prog).rotate(params.rotation - 90);
float

View File

@ -193,10 +193,9 @@ public class Weapon implements Cloneable{
drawOutline(unit, mount);
}
Draw.xscl = -Mathf.sign(flipSprite);
if(parts.size > 0){
DrawPart.params.set(mount.warmup, mount.reload / reload, mount.smoothReload, mount.heat, wx, wy, weaponRotation + 90);
DrawPart.params.sideMultiplier = flipSprite ? -1 : 1;
for(int i = 0; i < parts.size; i++){
var part = parts.items[i];
@ -206,6 +205,8 @@ public class Weapon implements Cloneable{
}
}
Draw.xscl = -Mathf.sign(flipSprite);
Draw.rect(region, wx, wy, weaponRotation);
if(heatRegion.found() && mount.heat > 0){