diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-11-22 16:18:22 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-11-22 16:18:22 +0100 |
commit | 5591bf3f826eff842e019bc82db5ae53aacba416 (patch) | |
tree | c994170722bec7533ea5e52b71c2b2abdc4a632a /test/src | |
parent | 9cbb7c7ba61c6f5d562ee81f13ba53d4aa6e9849 (diff) | |
download | gdx-boardgame-5591bf3f826eff842e019bc82db5ae53aacba416.zip gdx-boardgame-5591bf3f826eff842e019bc82db5ae53aacba416.tar.gz |
AnimationScreen : test sounds in ShellFireAnimation
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java | 8 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/Assets.java | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java index 6fff822..27295e6 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java @@ -55,10 +55,14 @@ public class AnimationsScreen extends AbstractScreen AnimationBatch batch; ShellFireAnimation.register("cfg0", 1f, 66f, 400f, 1.3f, 1f, app.assets.getTexture(app.assets.SHELL_FIRE), 1, 8, - app.assets.getTexture(app.assets.EXPLOSIONS), 16, 8); + app.assets.getTexture(app.assets.EXPLOSIONS), 16, 8, + app.assets.getSound(app.assets.SHELL_FIRE_SND), + app.assets.getSound(app.assets.EXPLOSION_SND)); ShellFireAnimation.register("cfg1", .5f, 11f, 500f, .8f, 1f, app.assets.getTexture(app.assets.SHELL_FIRE), 1, 8, - app.assets.getTexture(app.assets.EXPLOSIONS), 16, 8); + app.assets.getTexture(app.assets.EXPLOSIONS), 16, 8, + app.assets.getSound(app.assets.SHELL_FIRE_SND), + app.assets.getSound(app.assets.EXPLOSION_SND)); animations = AnimationSequence.obtain(10); animations.add(BounceAnimation.obtain(panzer, 2f, 3f, -1)); diff --git a/test/src/ch/asynk/gdx/boardgame/test/Assets.java b/test/src/ch/asynk/gdx/boardgame/test/Assets.java index d7e9a1b..e1b4023 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/Assets.java +++ b/test/src/ch/asynk/gdx/boardgame/test/Assets.java @@ -1,5 +1,6 @@ package ch.asynk.gdx.boardgame.test; +import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver; import com.badlogic.gdx.graphics.Texture; @@ -25,7 +26,9 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets public static final String PANZER = "panzer.png"; public static final String HEX_OVERLAYS = "hex-overlays.atlas"; public static final String SHELL_FIRE = "shell_fire.png"; + public static final String SHELL_FIRE_SND = "shell_fire.ogg"; public static final String EXPLOSIONS = "explosions.png"; + public static final String EXPLOSION_SND = "explosion.ogg"; private final FreeTypeFontLoaderParameter params20; private final FreeTypeFontLoaderParameter params25; @@ -73,7 +76,9 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets load(FONT_25, BitmapFont.class, params25); load(HEX_OVERLAYS, TextureAtlas.class); load(SHELL_FIRE, Texture.class); + load(SHELL_FIRE_SND, Sound.class); load(EXPLOSIONS, Texture.class); + load(EXPLOSION_SND, Sound.class); } public void unloadApp() @@ -88,6 +93,8 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets unload(FONT_25); unload(HEX_OVERLAYS); unload(SHELL_FIRE); + unload(SHELL_FIRE_SND); unload(EXPLOSIONS); + unload(EXPLOSION_SND); } } |