Android Open Source - crash-landing Game Audio






From Project

Back to project page crash-landing.

License

The source code is released under:

MIT License

If you think the Android project crash-landing listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.balitechy.crashlanding;
/*w  w  w .j a v  a  2  s.co m*/
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;

public class GameAudio {

  public static com.badlogic.gdx.audio.Music music;
  public static com.badlogic.gdx.audio.Sound jet;
  public static com.badlogic.gdx.audio.Sound landed;
  public static com.badlogic.gdx.audio.Sound explode;

  public static void load () {
    music = loadMusic("data/determination.mp3");
    music.setLooping(true);
    jet = load("data/jet.mp3");
    landed = load("data/landed.mp3");
    explode = load("data/explode.mp3");
  }

  private static com.badlogic.gdx.audio.Sound load (String name) {
    return Gdx.audio.newSound(Gdx.files.internal(name));
  }
  
  private static com.badlogic.gdx.audio.Music loadMusic (String name) {
    return Gdx.audio.newMusic(Gdx.files.internal(name));
  }
  
  public static void dispose(){
    music.dispose();
    jet.dispose();
    landed.dispose();
    explode.dispose();
  }
}




Java Source Code List

com.balitechy.crashlanding.CrashLanding.java
com.balitechy.crashlanding.GameAudio.java
com.balitechy.crashlanding.GameUtils.java
com.balitechy.crashlanding.MainActivity.java
com.balitechy.crashlanding.Main.java
com.balitechy.crashlanding.models.Accelerator.java
com.balitechy.crashlanding.models.BaseObject.java
com.balitechy.crashlanding.models.FuelMeter.java
com.balitechy.crashlanding.models.LandingPad.java
com.balitechy.crashlanding.models.MovableObject.java
com.balitechy.crashlanding.models.SpaceShip.java
com.balitechy.crashlanding.screens.GameResult.java
com.balitechy.crashlanding.screens.GameScreen.java
com.balitechy.crashlanding.screens.HomeScreen.java