If units can have chargeSound, why not chargeTurrets too?
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package mindustry.world.blocks.defense.turrets;
|
||||
|
||||
import arc.audio.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
@@ -14,6 +15,7 @@ public class ChargeTurret extends PowerTurret{
|
||||
public float chargeMaxDelay = 10f;
|
||||
public Effect chargeEffect = Fx.none;
|
||||
public Effect chargeBeginEffect = Fx.none;
|
||||
public Sound chargeSound = Sounds.none;
|
||||
|
||||
public ChargeTurret(String name){
|
||||
super(name);
|
||||
@@ -28,7 +30,8 @@ public class ChargeTurret extends PowerTurret{
|
||||
|
||||
tr.trns(rotation, size * tilesize / 2f);
|
||||
chargeBeginEffect.at(x + tr.x, y + tr.y, rotation);
|
||||
|
||||
chargeSound.at(tile, Mathf.random(0.9f, 1.1f));
|
||||
|
||||
for(int i = 0; i < chargeEffects; i++){
|
||||
Time.run(Mathf.random(chargeMaxDelay), () -> {
|
||||
if(!isValid()) return;
|
||||
|
||||
Reference in New Issue
Block a user