Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
package mindustry.world.blocks.defense.turrets;
|
package mindustry.world.blocks.defense.turrets;
|
||||||
|
|
||||||
|
import arc.audio.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
|
import mindustry.type.*;
|
||||||
|
import mindustry.gen.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -14,6 +17,7 @@ public class ChargeTurret extends PowerTurret{
|
|||||||
public float chargeMaxDelay = 10f;
|
public float chargeMaxDelay = 10f;
|
||||||
public Effect chargeEffect = Fx.none;
|
public Effect chargeEffect = Fx.none;
|
||||||
public Effect chargeBeginEffect = Fx.none;
|
public Effect chargeBeginEffect = Fx.none;
|
||||||
|
public Sound chargeSound = Sounds.none;
|
||||||
|
|
||||||
public ChargeTurret(String name){
|
public ChargeTurret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -28,7 +32,8 @@ public class ChargeTurret extends PowerTurret{
|
|||||||
|
|
||||||
tr.trns(rotation, size * tilesize / 2f);
|
tr.trns(rotation, size * tilesize / 2f);
|
||||||
chargeBeginEffect.at(x + tr.x, y + tr.y, rotation);
|
chargeBeginEffect.at(x + tr.x, y + tr.y, rotation);
|
||||||
|
chargeSound.at(x + tr.x, y + tr.y, 1);
|
||||||
|
|
||||||
for(int i = 0; i < chargeEffects; i++){
|
for(int i = 0; i < chargeEffects; i++){
|
||||||
Time.run(Mathf.random(chargeMaxDelay), () -> {
|
Time.run(Mathf.random(chargeMaxDelay), () -> {
|
||||||
if(!isValid()) return;
|
if(!isValid()) return;
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ public abstract class Turret extends Block{
|
|||||||
|
|
||||||
fshootEffect.at(x + tr.x, y + tr.y, rotation);
|
fshootEffect.at(x + tr.x, y + tr.y, rotation);
|
||||||
fsmokeEffect.at(x + tr.x, y + tr.y, rotation);
|
fsmokeEffect.at(x + tr.x, y + tr.y, rotation);
|
||||||
shootSound.at(tile, Mathf.random(0.9f, 1.1f));
|
shootSound.at(x + tr.x, y + tr.y, Mathf.random(0.9f, 1.1f));
|
||||||
|
|
||||||
if(shootShake > 0){
|
if(shootShake > 0){
|
||||||
Effect.shake(shootShake, shootShake, this);
|
Effect.shake(shootShake, shootShake, this);
|
||||||
|
|||||||
@@ -7,5 +7,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"address": "md.surrealment.com"
|
"address": "md.surrealment.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"address": "mindustry.pl:6660"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user