Launchpad Launch Sound (#4146)
* Launchpad Launch Sound * Update LaunchPad.java
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package mindustry.world.blocks.campaign;
|
package mindustry.world.blocks.campaign;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
|
import arc.audio.*;
|
||||||
import arc.Graphics.*;
|
import arc.Graphics.*;
|
||||||
import arc.Graphics.Cursor.*;
|
import arc.Graphics.Cursor.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
@@ -28,6 +29,7 @@ public class LaunchPad extends Block{
|
|||||||
public final int timerLaunch = timers++;
|
public final int timerLaunch = timers++;
|
||||||
/** Time inbetween launches. */
|
/** Time inbetween launches. */
|
||||||
public float launchTime;
|
public float launchTime;
|
||||||
|
public Sound launchSound = Sounds.none;
|
||||||
|
|
||||||
public @Load("@-light") TextureRegion lightRegion;
|
public @Load("@-light") TextureRegion lightRegion;
|
||||||
public @Load("launchpod") TextureRegion podRegion;
|
public @Load("launchpod") TextureRegion podRegion;
|
||||||
@@ -119,6 +121,7 @@ public class LaunchPad extends Block{
|
|||||||
|
|
||||||
//launch when full and base conditions are met
|
//launch when full and base conditions are met
|
||||||
if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){
|
if(items.total() >= itemCapacity && efficiency() >= 1f && timer(timerLaunch, launchTime / timeScale)){
|
||||||
|
launchSound.at(x, y);
|
||||||
LaunchPayload entity = LaunchPayload.create();
|
LaunchPayload entity = LaunchPayload.create();
|
||||||
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
items.each((item, amount) -> entity.stacks.add(new ItemStack(item, amount)));
|
||||||
entity.set(this);
|
entity.set(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user