Re-added classic sound effects for testing
This commit is contained in:
@@ -30,13 +30,8 @@ public class AssetsAnnotationProcessor extends AbstractProcessor{
|
|||||||
if(round++ != 0) return false; //only process 1 round
|
if(round++ != 0) return false; //only process 1 round
|
||||||
|
|
||||||
try{
|
try{
|
||||||
process("Sounds", "core/assets/sounds", (type, fname, name) ->
|
process("Sounds", "core/assets/sounds", "io.anuke.arc.audio.Sound", "newSound");
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess("io.anuke.arc.audio.Sound"), name, Modifier.STATIC, Modifier.PUBLIC, Modifier.FINAL)
|
process("Musics", "core/assets/music", "io.anuke.arc.audio.Music", "newMusic");
|
||||||
.initializer(CodeBlock.builder().add("io.anuke.arc.Core.audio.newSound(io.anuke.arc.Core.files.internal($S))", "sounds/" + fname).build()).build()));
|
|
||||||
|
|
||||||
process("Musics", "core/assets/music", (type, fname, name) ->
|
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess("io.anuke.arc.audio.Music"), name, Modifier.STATIC, Modifier.PUBLIC, Modifier.FINAL)
|
|
||||||
.initializer(CodeBlock.builder().add("io.anuke.arc.Core.audio.newMusic(io.anuke.arc.Core.files.internal($S))", "music/" + fname).build()).build()));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
@@ -50,8 +45,10 @@ public class AssetsAnnotationProcessor extends AbstractProcessor{
|
|||||||
return Collections.singleton("*");
|
return Collections.singleton("*");
|
||||||
}
|
}
|
||||||
|
|
||||||
void process(String classname, String path, Conser cons) throws Exception{
|
void process(String classname, String path, String rtype, String loadMethod) throws Exception{
|
||||||
TypeSpec.Builder type = TypeSpec.classBuilder(classname).addModifiers(Modifier.PUBLIC);
|
TypeSpec.Builder type = TypeSpec.classBuilder(classname).addModifiers(Modifier.PUBLIC);
|
||||||
|
MethodSpec.Builder load = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
MethodSpec.Builder dispose = MethodSpec.methodBuilder("dispose").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
|
||||||
HashSet<String> names = new HashSet<>();
|
HashSet<String> names = new HashSet<>();
|
||||||
Files.list(Paths.get(path)).forEach(p -> {
|
Files.list(Paths.get(path)).forEach(p -> {
|
||||||
@@ -69,15 +66,15 @@ public class AssetsAnnotationProcessor extends AbstractProcessor{
|
|||||||
name = name + "s";
|
name = name + "s";
|
||||||
}
|
}
|
||||||
|
|
||||||
cons.consume(type, fname, name);
|
load.addStatement(name + " = io.anuke.arc.Core.audio."+loadMethod+"(io.anuke.arc.Core.files.internal($S))", path.substring(path.lastIndexOf("/") + 1) + "/" + fname);
|
||||||
|
dispose.addStatement(name + ".dispose()");
|
||||||
|
dispose.addStatement(name + " = null");
|
||||||
|
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new io.anuke.arc.audio.mock.Mock" + rtype.substring(rtype.lastIndexOf(".") + 1)+ "()").build());
|
||||||
|
//cons.consume(type, fname, name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
type.addMethod(load.build());
|
||||||
|
type.addMethod(dispose.build());
|
||||||
JavaFile.builder(packageName, type.build()).build().writeTo(Utils.filer);
|
JavaFile.builder(packageName, type.build()).build().writeTo(Utils.filer);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Conser{
|
|
||||||
void consume(TypeSpec.Builder type, String fname, String name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
core/assets/music/menu.ogg
Normal file
BIN
core/assets/music/menu.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/back.ogg
Normal file
BIN
core/assets/sounds/back.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/bang.mp3
Normal file
BIN
core/assets/sounds/bang.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/bang2.mp3
Normal file
BIN
core/assets/sounds/bang2.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/bigshot.mp3
Normal file
BIN
core/assets/sounds/bigshot.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/blast.mp3
Normal file
BIN
core/assets/sounds/blast.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/bloop.mp3
Normal file
BIN
core/assets/sounds/bloop.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/break.mp3
Normal file
BIN
core/assets/sounds/break.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/corexplode.mp3
Normal file
BIN
core/assets/sounds/corexplode.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/die.mp3
Normal file
BIN
core/assets/sounds/die.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/enemyshoot.mp3
Normal file
BIN
core/assets/sounds/enemyshoot.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/explosion.mp3
Normal file
BIN
core/assets/sounds/explosion.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/flame.mp3
Normal file
BIN
core/assets/sounds/flame.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/flame2.mp3
Normal file
BIN
core/assets/sounds/flame2.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/laser.mp3
Normal file
BIN
core/assets/sounds/laser.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/lasershot.mp3
Normal file
BIN
core/assets/sounds/lasershot.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/missile.mp3
Normal file
BIN
core/assets/sounds/missile.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/ping.mp3
Normal file
BIN
core/assets/sounds/ping.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/place.mp3
Normal file
BIN
core/assets/sounds/place.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/press.ogg
Normal file
BIN
core/assets/sounds/press.ogg
Normal file
Binary file not shown.
BIN
core/assets/sounds/purchase.mp3
Normal file
BIN
core/assets/sounds/purchase.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/resonate.mp3
Normal file
BIN
core/assets/sounds/resonate.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/respawn.mp3
Normal file
BIN
core/assets/sounds/respawn.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/shoot.mp3
Normal file
BIN
core/assets/sounds/shoot.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/spawn.mp3
Normal file
BIN
core/assets/sounds/spawn.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/tesla.mp3
Normal file
BIN
core/assets/sounds/tesla.mp3
Normal file
Binary file not shown.
BIN
core/assets/sounds/waveend.mp3
Normal file
BIN
core/assets/sounds/waveend.mp3
Normal file
Binary file not shown.
@@ -1,12 +1,12 @@
|
|||||||
package io.anuke.mindustry;
|
package io.anuke.mindustry;
|
||||||
|
|
||||||
import io.anuke.arc.*;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.math.Mathf;
|
import io.anuke.arc.math.*;
|
||||||
import io.anuke.arc.util.Log;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.arc.util.Time;
|
|
||||||
import io.anuke.mindustry.core.*;
|
import io.anuke.mindustry.core.*;
|
||||||
import io.anuke.mindustry.game.EventType.GameLoadEvent;
|
import io.anuke.mindustry.game.EventType.*;
|
||||||
import io.anuke.mindustry.io.BundleLoader;
|
import io.anuke.mindustry.gen.*;
|
||||||
|
import io.anuke.mindustry.io.*;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -26,6 +26,9 @@ public class Mindustry extends ApplicationCore{
|
|||||||
Vars.init();
|
Vars.init();
|
||||||
Log.setUseColors(false);
|
Log.setUseColors(false);
|
||||||
BundleLoader.load();
|
BundleLoader.load();
|
||||||
|
Musics.load();
|
||||||
|
Sounds.load();
|
||||||
|
|
||||||
content.load();
|
content.load();
|
||||||
content.loadColors();
|
content.loadColors();
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ public class Control implements ApplicationListener{
|
|||||||
ui.hudfrag.showToast(Core.bundle.format("zone.config.complete", e.zone.configureWave));
|
ui.hudfrag.showToast(Core.bundle.format("zone.config.complete", e.zone.configureWave));
|
||||||
});
|
});
|
||||||
|
|
||||||
Musics.menu.play();
|
Musics.menu.setLooping(true);
|
||||||
|
// Musics.menu.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
void createPlayer(){
|
void createPlayer(){
|
||||||
@@ -230,6 +231,8 @@ public class Control implements ApplicationListener{
|
|||||||
public void dispose(){
|
public void dispose(){
|
||||||
content.dispose();
|
content.dispose();
|
||||||
Net.dispose();
|
Net.dispose();
|
||||||
|
Musics.dispose();
|
||||||
|
Sounds.dispose();
|
||||||
ui.editor.dispose();
|
ui.editor.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
|||||||
}
|
}
|
||||||
|
|
||||||
unit.onSuperDeath();
|
unit.onSuperDeath();
|
||||||
|
unit.type.deathSound.at(unit);
|
||||||
|
|
||||||
//visual only.
|
//visual only.
|
||||||
if(Net.client()){
|
if(Net.client()){
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
|||||||
dead = true;
|
dead = true;
|
||||||
|
|
||||||
Events.fire(new BlockDestroyEvent(tile));
|
Events.fire(new BlockDestroyEvent(tile));
|
||||||
|
block.breakSound.at(tile);
|
||||||
block.onDestroyed(tile);
|
block.onDestroyed(tile);
|
||||||
world.removeBlock(tile);
|
world.removeBlock(tile);
|
||||||
remove();
|
remove();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import io.anuke.mindustry.entities.units.Statuses;
|
|||||||
import io.anuke.mindustry.game.EventType.UnitDestroyEvent;
|
import io.anuke.mindustry.game.EventType.UnitDestroyEvent;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.game.Teams.TeamData;
|
import io.anuke.mindustry.game.Teams.TeamData;
|
||||||
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.graphics.Pal;
|
import io.anuke.mindustry.graphics.Pal;
|
||||||
import io.anuke.mindustry.net.Interpolator;
|
import io.anuke.mindustry.net.Interpolator;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
@@ -108,6 +109,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
|||||||
Effects.effect(Fx.explosion, this);
|
Effects.effect(Fx.explosion, this);
|
||||||
Effects.shake(2f, 2f, this);
|
Effects.shake(2f, 2f, this);
|
||||||
|
|
||||||
|
Sounds.bang.at(this);
|
||||||
item.amount = 0;
|
item.amount = 0;
|
||||||
drownTime = 0f;
|
drownTime = 0f;
|
||||||
status.clear();
|
status.clear();
|
||||||
|
|||||||
4
core/src/io/anuke/mindustry/game/MusicControl.java
Normal file
4
core/src/io/anuke/mindustry/game/MusicControl.java
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package io.anuke.mindustry.game;
|
||||||
|
|
||||||
|
public class MusicControl{
|
||||||
|
}
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
package io.anuke.mindustry.type;
|
package io.anuke.mindustry.type;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.collection.ObjectSet;
|
import io.anuke.arc.audio.*;
|
||||||
import io.anuke.arc.function.Supplier;
|
import io.anuke.arc.collection.*;
|
||||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
import io.anuke.arc.function.*;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
import io.anuke.mindustry.content.Items;
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
import io.anuke.mindustry.entities.type.BaseUnit;
|
import io.anuke.mindustry.content.*;
|
||||||
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.game.*;
|
import io.anuke.mindustry.game.*;
|
||||||
import io.anuke.mindustry.ui.ContentDisplay;
|
import io.anuke.mindustry.gen.*;
|
||||||
|
import io.anuke.mindustry.ui.*;
|
||||||
|
|
||||||
public class UnitType extends UnlockableContent{
|
public class UnitType extends UnlockableContent{
|
||||||
public final TypeID typeID;
|
public final TypeID typeID;
|
||||||
@@ -35,6 +37,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public Weapon weapon;
|
public Weapon weapon;
|
||||||
public float weaponOffsetY, engineOffset = 6f, engineSize = 2f;
|
public float weaponOffsetY, engineOffset = 6f, engineSize = 2f;
|
||||||
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
||||||
|
public Sound deathSound = Sounds.bang;
|
||||||
|
|
||||||
public TextureRegion iconRegion, legRegion, baseRegion, region;
|
public TextureRegion iconRegion, legRegion, baseRegion, region;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class Weapon{
|
|||||||
/** whether shooter rotation is ignored when shooting. */
|
/** whether shooter rotation is ignored when shooting. */
|
||||||
public boolean ignoreRotation = false;
|
public boolean ignoreRotation = false;
|
||||||
|
|
||||||
public Sound shootSound = Sounds.railgun;
|
public Sound shootSound = Sounds.shoot;
|
||||||
|
|
||||||
public TextureRegion region;
|
public TextureRegion region;
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package io.anuke.mindustry.ui.dialogs;
|
package io.anuke.mindustry.ui.dialogs;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.Events;
|
import io.anuke.arc.input.*;
|
||||||
import io.anuke.arc.input.KeyCode;
|
import io.anuke.arc.scene.event.*;
|
||||||
import io.anuke.arc.scene.ui.Dialog;
|
import io.anuke.arc.scene.ui.*;
|
||||||
import io.anuke.arc.scene.ui.ScrollPane;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.arc.util.Align;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
import io.anuke.mindustry.core.GameState.State;
|
import io.anuke.mindustry.game.EventType.*;
|
||||||
import io.anuke.mindustry.game.EventType.ResizeEvent;
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.graphics.Pal;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.iconsize;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
import static io.anuke.mindustry.Vars.state;
|
|
||||||
|
|
||||||
public class FloatingDialog extends Dialog{
|
public class FloatingDialog extends Dialog{
|
||||||
private boolean wasPaused;
|
private boolean wasPaused;
|
||||||
@@ -32,7 +31,9 @@ public class FloatingDialog extends Dialog{
|
|||||||
state.set(State.playing);
|
state.set(State.playing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Sounds.back.play();
|
||||||
});
|
});
|
||||||
|
ClickListener.clicked = () -> Sounds.press.play();
|
||||||
|
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
if(shouldPause && !state.is(State.menu)){
|
if(shouldPause && !state.is(State.menu)){
|
||||||
|
|||||||
@@ -1,38 +1,36 @@
|
|||||||
package io.anuke.mindustry.world;
|
package io.anuke.mindustry.world;
|
||||||
|
|
||||||
import io.anuke.annotations.Annotations.CallSuper;
|
import io.anuke.annotations.Annotations.*;
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.Graphics.Cursor;
|
import io.anuke.arc.Graphics.*;
|
||||||
import io.anuke.arc.Graphics.Cursor.SystemCursor;
|
import io.anuke.arc.Graphics.Cursor.*;
|
||||||
import io.anuke.arc.collection.Array;
|
import io.anuke.arc.audio.*;
|
||||||
import io.anuke.arc.collection.EnumSet;
|
import io.anuke.arc.collection.EnumSet;
|
||||||
import io.anuke.arc.function.BooleanProvider;
|
import io.anuke.arc.collection.*;
|
||||||
import io.anuke.arc.function.Function;
|
import io.anuke.arc.function.*;
|
||||||
import io.anuke.arc.graphics.Color;
|
import io.anuke.arc.graphics.*;
|
||||||
import io.anuke.arc.graphics.g2d.*;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
import io.anuke.arc.graphics.g2d.TextureAtlas.AtlasRegion;
|
import io.anuke.arc.graphics.g2d.TextureAtlas.*;
|
||||||
import io.anuke.arc.math.Mathf;
|
import io.anuke.arc.math.*;
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
import io.anuke.arc.util.Align;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.arc.util.Time;
|
import io.anuke.arc.util.pooling.*;
|
||||||
import io.anuke.arc.util.pooling.Pools;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.entities.Damage;
|
import io.anuke.mindustry.entities.bullet.*;
|
||||||
import io.anuke.mindustry.entities.bullet.Bullet;
|
import io.anuke.mindustry.entities.effect.*;
|
||||||
import io.anuke.mindustry.entities.effect.Puddle;
|
import io.anuke.mindustry.entities.type.Unit;
|
||||||
import io.anuke.mindustry.entities.effect.RubbleDecal;
|
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.game.UnlockableContent;
|
import io.anuke.mindustry.game.*;
|
||||||
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.graphics.*;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.input.InputHandler.PlaceDraw;
|
import io.anuke.mindustry.input.InputHandler.*;
|
||||||
import io.anuke.mindustry.type.*;
|
import io.anuke.mindustry.type.*;
|
||||||
import io.anuke.mindustry.ui.Bar;
|
import io.anuke.mindustry.ui.*;
|
||||||
import io.anuke.mindustry.ui.ContentDisplay;
|
import io.anuke.mindustry.world.blocks.*;
|
||||||
import io.anuke.mindustry.world.blocks.Floor;
|
|
||||||
import io.anuke.mindustry.world.blocks.OverlayFloor;
|
|
||||||
import io.anuke.mindustry.world.consumers.*;
|
import io.anuke.mindustry.world.consumers.*;
|
||||||
import io.anuke.mindustry.world.meta.*;
|
import io.anuke.mindustry.world.meta.*;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -98,6 +96,8 @@ public class Block extends BlockStorage{
|
|||||||
public boolean outlineIcon = false;
|
public boolean outlineIcon = false;
|
||||||
/** Whether this block has a shadow under it. */
|
/** Whether this block has a shadow under it. */
|
||||||
public boolean hasShadow = true;
|
public boolean hasShadow = true;
|
||||||
|
/** Sounds made when this block breaks.*/
|
||||||
|
public Sound breakSound = Sounds.die;
|
||||||
|
|
||||||
/** Cost of constructing this block. */
|
/** Cost of constructing this block. */
|
||||||
public ItemStack[] buildRequirements = new ItemStack[]{};
|
public ItemStack[] buildRequirements = new ItemStack[]{};
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
|||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.game.EventType.BlockBuildEndEvent;
|
import io.anuke.mindustry.game.EventType.BlockBuildEndEvent;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.gen.Call;
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.graphics.*;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.type.ItemStack;
|
import io.anuke.mindustry.type.ItemStack;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
@@ -54,6 +54,7 @@ public class BuildBlock extends Block{
|
|||||||
Effects.effect(Fx.breakBlock, tile.drawx(), tile.drawy(), block.size);
|
Effects.effect(Fx.breakBlock, tile.drawx(), tile.drawy(), block.size);
|
||||||
world.removeBlock(tile);
|
world.removeBlock(tile);
|
||||||
Events.fire(new BlockBuildEndEvent(tile, team, true));
|
Events.fire(new BlockBuildEndEvent(tile, team, true));
|
||||||
|
Sounds.breaks.at(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(called = Loc.server)
|
@Remote(called = Loc.server)
|
||||||
@@ -74,6 +75,7 @@ public class BuildBlock extends Block{
|
|||||||
Core.app.post(() -> tile.block().playerPlaced(tile));
|
Core.app.post(() -> tile.block().playerPlaced(tile));
|
||||||
}
|
}
|
||||||
Core.app.post(() -> Events.fire(new BlockBuildEndEvent(tile, team, false)));
|
Core.app.post(() -> Events.fire(new BlockBuildEndEvent(tile, team, false)));
|
||||||
|
Sounds.place.at(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user