Core units done
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 848 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
core/assets-raw/sprites/units/weapons/build-weapon.png
Normal file
|
After Width: | Height: | Size: 408 B |
@@ -3153,6 +3153,7 @@ public class UnitTypes{
|
|||||||
);
|
);
|
||||||
|
|
||||||
weapons.add(new RepairBeamWeapon(){{
|
weapons.add(new RepairBeamWeapon(){{
|
||||||
|
widthSinMag = 0.11f;
|
||||||
reload = 25f;
|
reload = 25f;
|
||||||
x = 0f;
|
x = 0f;
|
||||||
y = 6.5f;
|
y = 6.5f;
|
||||||
@@ -3205,13 +3206,14 @@ public class UnitTypes{
|
|||||||
engineSize = 3.1f;
|
engineSize = 3.1f;
|
||||||
|
|
||||||
setEnginesMirror(
|
setEnginesMirror(
|
||||||
new UnitEngine(27 / 4f, -1 / 4f, 2.4f, 315f)
|
new UnitEngine(25 / 4f, -1 / 4f, 2.4f, 300f)
|
||||||
);
|
);
|
||||||
|
|
||||||
weapons.add(new RepairBeamWeapon(){{
|
weapons.add(new RepairBeamWeapon(){{
|
||||||
|
widthSinMag = 0.11f;
|
||||||
reload = 25f;
|
reload = 25f;
|
||||||
x = 0f;
|
x = 0f;
|
||||||
y = 6.5f;
|
y = 7.5f;
|
||||||
rotate = false;
|
rotate = false;
|
||||||
shootY = 0f;
|
shootY = 0f;
|
||||||
beamWidth = 0.7f;
|
beamWidth = 0.7f;
|
||||||
@@ -3232,6 +3234,17 @@ public class UnitTypes{
|
|||||||
maxRange = 60f;
|
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"){{
|
emanate = new ErekirUnitType("emanate"){{
|
||||||
@@ -3249,7 +3262,7 @@ public class UnitTypes{
|
|||||||
mineTier = 4;
|
mineTier = 4;
|
||||||
buildSpeed = 1.4f;
|
buildSpeed = 1.4f;
|
||||||
drag = 0.08f;
|
drag = 0.08f;
|
||||||
speed = 7.1f;
|
speed = 7.2f;
|
||||||
rotateSpeed = 8f;
|
rotateSpeed = 8f;
|
||||||
accel = 0.08f;
|
accel = 0.08f;
|
||||||
itemCapacity = 110;
|
itemCapacity = 110;
|
||||||
@@ -3257,15 +3270,16 @@ public class UnitTypes{
|
|||||||
armor = 3f;
|
armor = 3f;
|
||||||
hitSize = 12f;
|
hitSize = 12f;
|
||||||
|
|
||||||
engineOffset = 7.4f;
|
engineOffset = 7.5f;
|
||||||
engineSize = 3.3f;
|
engineSize = 3.4f;
|
||||||
|
|
||||||
setEnginesMirror(
|
setEnginesMirror(
|
||||||
new UnitEngine(34 / 4f, -12 / 4f, 2.7f, 315f),
|
new UnitEngine(35 / 4f, -13 / 4f, 2.7f, 315f),
|
||||||
new UnitEngine(27 / 4f, -34 / 4f, 2.7f, 315f)
|
new UnitEngine(28 / 4f, -35 / 4f, 2.7f, 315f)
|
||||||
);
|
);
|
||||||
|
|
||||||
weapons.add(new RepairBeamWeapon(){{
|
weapons.add(new RepairBeamWeapon(){{
|
||||||
|
widthSinMag = 0.11f;
|
||||||
reload = 25f;
|
reload = 25f;
|
||||||
x = 19f/4f;
|
x = 19f/4f;
|
||||||
y = 19f/4f;
|
y = 19f/4f;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class RepairBeamWeapon extends Weapon{
|
|||||||
public float beamWidth = 1f;
|
public float beamWidth = 1f;
|
||||||
public float pulseRadius = 6f;
|
public float pulseRadius = 6f;
|
||||||
public float pulseStroke = 2f;
|
public float pulseStroke = 2f;
|
||||||
|
public float widthSinMag = 0f, widthSinScl = 4f;
|
||||||
|
|
||||||
public TextureRegion laser, laserEnd, laserTop, laserTopEnd;
|
public TextureRegion laser, laserEnd, laserTop, laserTopEnd;
|
||||||
|
|
||||||
@@ -157,7 +158,7 @@ public class RepairBeamWeapon extends Weapon{
|
|||||||
|
|
||||||
float z = Draw.z();
|
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,
|
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);
|
laser, laserEnd, laserTop, laserTopEnd);
|
||||||
Draw.z(z);
|
Draw.z(z);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,17 +80,16 @@ public class BaseShield extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTile(){
|
public void updateTile(){
|
||||||
//TODO smooth radius
|
|
||||||
float radius = radius();
|
|
||||||
|
|
||||||
broken = efficiency() <= 0.0001f;
|
broken = efficiency() <= 0.0001f;
|
||||||
smoothRadius = Mathf.lerpDelta(smoothRadius, radius * efficiency(), 0.04f);
|
smoothRadius = Mathf.lerpDelta(smoothRadius, radius * efficiency(), 0.04f);
|
||||||
|
|
||||||
if(radius > 0 && !broken){
|
float rad = radius();
|
||||||
|
|
||||||
|
if(rad > 0 && !broken){
|
||||||
paramBuild = this;
|
paramBuild = this;
|
||||||
//paramEffect = absorbEffect;
|
//paramEffect = absorbEffect;
|
||||||
Groups.bullet.intersect(x - radius, y - radius, radius * 2f, radius * 2f, bulletConsumer);
|
Groups.bullet.intersect(x - rad, y - rad, rad * 2f, rad * 2f, bulletConsumer);
|
||||||
Units.nearbyEnemies(team, x, y, radius + 10f, unitConsumer);
|
Units.nearbyEnemies(team, x, y, rad + 10f, unitConsumer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||