New unit death, wreck and creation noises
This commit is contained in:
@@ -9,7 +9,7 @@ import mindustry.graphics.*;
|
||||
|
||||
public class PayloadVoid extends PayloadBlock{
|
||||
public Effect incinerateEffect = Fx.blastExplosion;
|
||||
public Sound incinerateSound = Sounds.bang;
|
||||
public Sound incinerateSound = Sounds.unitExplode1;
|
||||
|
||||
public PayloadVoid(String name){
|
||||
super(name);
|
||||
|
||||
@@ -3,6 +3,7 @@ package mindustry.world.blocks.units;
|
||||
import arc.*;
|
||||
import arc.Graphics.*;
|
||||
import arc.Graphics.Cursor.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
@@ -34,6 +35,9 @@ public class Reconstructor extends UnitBlock{
|
||||
public Seq<UnitType[]> upgrades = new Seq<>();
|
||||
public int[] capacities = {};
|
||||
|
||||
public Sound createSound = Sounds.unitCreate;
|
||||
public float createSoundVolume = 1f;
|
||||
|
||||
public Reconstructor(String name){
|
||||
super(name);
|
||||
regionRotated1 = 1;
|
||||
@@ -324,6 +328,7 @@ public class Reconstructor extends UnitBlock{
|
||||
payload.unit.command().command(command == null && payload.unit.type.defaultCommand != null ? payload.unit.type.defaultCommand : command);
|
||||
}
|
||||
|
||||
createSound.at(this, 1f + Mathf.range(0.06f), createSoundVolume);
|
||||
progress %= 1f;
|
||||
Effect.shake(2f, 3f, this);
|
||||
Fx.producesmoke.at(this);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.units;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@@ -45,6 +46,9 @@ public class UnitAssembler extends PayloadBlock{
|
||||
|
||||
public Seq<AssemblerUnitPlan> plans = new Seq<>(4);
|
||||
|
||||
public Sound createSound = Sounds.unitCreateBig;
|
||||
public float createSoundVolume = 1f;
|
||||
|
||||
protected @Nullable ConsumePayloadDynamic consPayload;
|
||||
protected @Nullable ConsumeItemDynamic consItem;
|
||||
|
||||
@@ -60,6 +64,8 @@ public class UnitAssembler extends PayloadBlock{
|
||||
group = BlockGroup.units;
|
||||
commandable = true;
|
||||
quickRotate = false;
|
||||
ambientSound = Sounds.respawning;
|
||||
ambientSoundVolume = 0.13f;
|
||||
}
|
||||
|
||||
public Rect getRect(Rect rect, float x, float y, int rotation){
|
||||
@@ -536,8 +542,10 @@ public class UnitAssembler extends PayloadBlock{
|
||||
Units.notifyUnitSpawn(unit);
|
||||
}
|
||||
|
||||
createSound.at(spawn.x, spawn.y, 1f + Mathf.range(0.06f), createSoundVolume);
|
||||
|
||||
progress = 0f;
|
||||
Fx.unitAssemble.at(spawn.x, spawn.y, 0f, plan.unit);
|
||||
Fx.unitAssemble.at(spawn.x, spawn.y, rotdeg() - 90f, plan.unit);
|
||||
blocks.clear();
|
||||
}
|
||||
|
||||
@@ -662,6 +670,7 @@ public class UnitAssembler extends PayloadBlock{
|
||||
float rot = payload.angleTo(spawn);
|
||||
Fx.shootPayloadDriver.at(payload.x(), payload.y(), rot);
|
||||
Fx.payloadDeposit.at(payload.x(), payload.y(), rot, new YeetData(spawn.cpy(), payload.content()));
|
||||
Sounds.shootPayload.at(x, y, 1f + Mathf.range(0.1f), 1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.units;
|
||||
|
||||
import arc.*;
|
||||
import arc.audio.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@@ -34,6 +35,8 @@ public class UnitFactory extends UnitBlock{
|
||||
public int[] capacities = {};
|
||||
|
||||
public Seq<UnitPlan> plans = new Seq<>(4);
|
||||
public Sound createSound = Sounds.unitCreate;
|
||||
public float createSoundVolume = 1f;
|
||||
|
||||
public UnitFactory(String name){
|
||||
super(name);
|
||||
@@ -417,6 +420,7 @@ public class UnitFactory extends UnitBlock{
|
||||
unit.command().command(command == null && unit.type.defaultCommand != null ? unit.type.defaultCommand : command);
|
||||
}
|
||||
|
||||
createSound.at(this, 1f + Mathf.range(0.06f), createSoundVolume);
|
||||
payload = new UnitPayload(unit);
|
||||
payVector.setZero();
|
||||
consume();
|
||||
|
||||
Reference in New Issue
Block a user