Interplanetary accelerator launch sounds
This commit is contained in:
BIN
core/assets/sounds/block/acceleratorCharge.ogg
Normal file
BIN
core/assets/sounds/block/acceleratorCharge.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/block/acceleratorConstruct.ogg
Normal file
BIN
core/assets/sounds/block/acceleratorConstruct.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/block/acceleratorLaunch.ogg
Normal file
BIN
core/assets/sounds/block/acceleratorLaunch.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/block/acceleratorLightning1.ogg
Normal file
BIN
core/assets/sounds/block/acceleratorLightning1.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/block/acceleratorLightning2.ogg
Normal file
BIN
core/assets/sounds/block/acceleratorLightning2.ogg
Normal file
Binary file not shown.
@@ -13,6 +13,12 @@ public class SoundPriority{
|
|||||||
public static void init(){
|
public static void init(){
|
||||||
max(7, beamPlasma, shootMeltdown, beamMeltdown);
|
max(7, beamPlasma, shootMeltdown, beamMeltdown);
|
||||||
|
|
||||||
|
//priority 3: absolutely do not interrupt these
|
||||||
|
set(
|
||||||
|
3f,
|
||||||
|
acceleratorLaunch, acceleratorCharge
|
||||||
|
);
|
||||||
|
|
||||||
//priority 2: long weapon loops and big explosions
|
//priority 2: long weapon loops and big explosions
|
||||||
set(
|
set(
|
||||||
2f,
|
2f,
|
||||||
|
|||||||
@@ -40,9 +40,12 @@ public class Accelerator extends Block{
|
|||||||
/** Override for planets that this block can launch to. If null, the planet's launch candidates are used. */
|
/** Override for planets that this block can launch to. If null, the planet's launch candidates are used. */
|
||||||
public @Nullable Seq<Planet> launchCandidates;
|
public @Nullable Seq<Planet> launchCandidates;
|
||||||
|
|
||||||
//TODO: launching needs audio!
|
|
||||||
|
|
||||||
public Music launchMusic = Musics.coreLaunch;
|
public Music launchMusic = Musics.coreLaunch;
|
||||||
|
public Sound lightningSound = new RandomSound(Sounds.acceleratorLightning1, Sounds.acceleratorLightning2, Sounds.shootArc);
|
||||||
|
public float lightningSoundVolume = 0.9f;
|
||||||
|
public Sound chargeSound = Sounds.acceleratorCharge;
|
||||||
|
public Sound launchSound = Sounds.acceleratorLaunch;
|
||||||
|
public Sound constructSound = Sounds.acceleratorConstruct;
|
||||||
public float launchDuration = 120f;
|
public float launchDuration = 120f;
|
||||||
public float chargeDuration = 220f;
|
public float chargeDuration = 220f;
|
||||||
public float buildDuration = 120f;
|
public float buildDuration = 120f;
|
||||||
@@ -340,11 +343,14 @@ public class Accelerator extends Block{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
Core.scene.add(image);
|
Core.scene.add(image);
|
||||||
|
chargeSound.at(this);
|
||||||
|
constructSound.at(this);
|
||||||
|
|
||||||
Time.run(chargeDuration, () -> {
|
Time.run(chargeDuration, () -> {
|
||||||
Fx.coreLaunchConstruct.at(x, y, launchBlock.size);
|
Fx.coreLaunchConstruct.at(x, y, launchBlock.size);
|
||||||
Fx.launchAccelerator.at(x, y);
|
Fx.launchAccelerator.at(x, y);
|
||||||
Effect.shake(10f, 14f, this);
|
Effect.shake(10f, 14f, this);
|
||||||
|
launchSound.at(this);
|
||||||
|
|
||||||
for(int i = 0; i < launchLightning; i++){
|
for(int i = 0; i < launchLightning; i++){
|
||||||
float a = Mathf.random(360f);
|
float a = Mathf.random(360f);
|
||||||
@@ -410,6 +416,7 @@ public class Accelerator extends Block{
|
|||||||
if(in > launchDuration){
|
if(in > launchDuration){
|
||||||
if(Mathf.chanceDelta(lightningLaunchChance * Interp.pow3In.apply(chargeFout))){
|
if(Mathf.chanceDelta(lightningLaunchChance * Interp.pow3In.apply(chargeFout))){
|
||||||
float a = Mathf.random(360f);
|
float a = Mathf.random(360f);
|
||||||
|
lightningSound.at(this, 1f + Mathf.range(0.1f), lightningSoundVolume);
|
||||||
Lightning.create(team, lightningColor, lightningDamage, x + Angles.trnsx(a, lightningOffset), y + Angles.trnsy(a, lightningOffset), a, Mathf.random(lightningLengthMin, lightningLengthMax));
|
Lightning.create(team, lightningColor, lightningDamage, x + Angles.trnsx(a, lightningOffset), y + Angles.trnsy(a, lightningOffset), a, Mathf.random(lightningLengthMin, lightningLengthMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=d19597009c
|
archash=ce729c4fe4
|
||||||
|
|||||||
Reference in New Issue
Block a user