Core units done

This commit is contained in:
Anuken 2022-02-07 17:36:58 -05:00
parent 0f0464bb86
commit eddac79c54
7 changed files with 28 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

View File

@ -3153,6 +3153,7 @@ public class UnitTypes{
);
weapons.add(new RepairBeamWeapon(){{
widthSinMag = 0.11f;
reload = 25f;
x = 0f;
y = 6.5f;
@ -3205,13 +3206,14 @@ public class UnitTypes{
engineSize = 3.1f;
setEnginesMirror(
new UnitEngine(27 / 4f, -1 / 4f, 2.4f, 315f)
new UnitEngine(25 / 4f, -1 / 4f, 2.4f, 300f)
);
weapons.add(new RepairBeamWeapon(){{
widthSinMag = 0.11f;
reload = 25f;
x = 0f;
y = 6.5f;
y = 7.5f;
rotate = false;
shootY = 0f;
beamWidth = 0.7f;
@ -3232,6 +3234,17 @@ public class UnitTypes{
maxRange = 60f;
}};
}});
drawBuildBeam = false;
weapons.add(new BuildWeapon("build-weapon"){{
rotate = true;
rotateSpeed = 7f;
x = 14/4f;
y = 15/4f;
layerOffset = -0.001f;
shootY = 3f;
}});
}};
emanate = new ErekirUnitType("emanate"){{
@ -3249,7 +3262,7 @@ public class UnitTypes{
mineTier = 4;
buildSpeed = 1.4f;
drag = 0.08f;
speed = 7.1f;
speed = 7.2f;
rotateSpeed = 8f;
accel = 0.08f;
itemCapacity = 110;
@ -3257,15 +3270,16 @@ public class UnitTypes{
armor = 3f;
hitSize = 12f;
engineOffset = 7.4f;
engineSize = 3.3f;
engineOffset = 7.5f;
engineSize = 3.4f;
setEnginesMirror(
new UnitEngine(34 / 4f, -12 / 4f, 2.7f, 315f),
new UnitEngine(27 / 4f, -34 / 4f, 2.7f, 315f)
new UnitEngine(35 / 4f, -13 / 4f, 2.7f, 315f),
new UnitEngine(28 / 4f, -35 / 4f, 2.7f, 315f)
);
weapons.add(new RepairBeamWeapon(){{
widthSinMag = 0.11f;
reload = 25f;
x = 19f/4f;
y = 19f/4f;

View File

@ -30,6 +30,7 @@ public class RepairBeamWeapon extends Weapon{
public float beamWidth = 1f;
public float pulseRadius = 6f;
public float pulseStroke = 2f;
public float widthSinMag = 0f, widthSinScl = 4f;
public TextureRegion laser, laserEnd, laserTop, laserTopEnd;
@ -157,7 +158,7 @@ public class RepairBeamWeapon extends Weapon{
float z = Draw.z();
RepairPoint.drawBeam(wx, wy, unit.rotation + mount.rotation, shootY, unit.id, mount.target == null || controllable ? null : (Sized)mount.target, unit.team, heal.strength,
pulseStroke, pulseRadius, beamWidth, heal.lastEnd, heal.offset, laserColor, laserTopColor,
pulseStroke, pulseRadius, beamWidth + Mathf.absin(widthSinScl, widthSinMag), heal.lastEnd, heal.offset, laserColor, laserTopColor,
laser, laserEnd, laserTop, laserTopEnd);
Draw.z(z);
}

View File

@ -80,17 +80,16 @@ public class BaseShield extends Block{
@Override
public void updateTile(){
//TODO smooth radius
float radius = radius();
broken = efficiency() <= 0.0001f;
smoothRadius = Mathf.lerpDelta(smoothRadius, radius * efficiency(), 0.04f);
if(radius > 0 && !broken){
float rad = radius();
if(rad > 0 && !broken){
paramBuild = this;
//paramEffect = absorbEffect;
Groups.bullet.intersect(x - radius, y - radius, radius * 2f, radius * 2f, bulletConsumer);
Units.nearbyEnemies(team, x, y, radius + 10f, unitConsumer);
Groups.bullet.intersect(x - rad, y - rad, rad * 2f, rad * 2f, bulletConsumer);
Units.nearbyEnemies(team, x, y, rad + 10f, unitConsumer);
}
}