Android Open Source - SpaceGame Assets






From Project

Back to project page SpaceGame.

License

The source code is released under:

Copyright (c) 2012 ??ukasz Patalas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the So...

If you think the Android project SpaceGame 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.lpatalas.spacegame;
/*from   ww  w. ja  v a  2  s  . c  om*/
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Texture;

/**
 * User: Lukasz
 * Date: 11.08.12
 */
class Assets {
  private static final String ASTEROID_TEXTURE_NAME = "images/asteroid.png";
  private static final String GAME_OVER_TEXTURE_NAME = "images/gameOver.png";
  private static final String PLAYER_TEXTURE_NAME = "images/ship.png";
  private static final String STAR_TEXTURE_NAME = "images/dot.png";

  private final AssetManager assetManager = new AssetManager();

  public void load() {
    assetManager.load(ASTEROID_TEXTURE_NAME, Texture.class);
    assetManager.load(GAME_OVER_TEXTURE_NAME, Texture.class);
    assetManager.load(PLAYER_TEXTURE_NAME, Texture.class);
    assetManager.load(STAR_TEXTURE_NAME, Texture.class);
    assetManager.finishLoading();
  }

  public Texture getAsteroidTexture() {
    return assetManager.get(ASTEROID_TEXTURE_NAME, Texture.class);
  }

  public Texture getGameOverTexture() {
    return assetManager.get(GAME_OVER_TEXTURE_NAME, Texture.class);
  }

  public Texture getPlayerTexture() {
    return assetManager.get(PLAYER_TEXTURE_NAME, Texture.class);
  }

  public Texture getStarTexture() {
    return assetManager.get(STAR_TEXTURE_NAME, Texture.class);
  }

  public void dispose() {
    assetManager.clear();
  }
}




Java Source Code List

com.lpatalas.spacegame.Assets.java
com.lpatalas.spacegame.Asteroid.java
com.lpatalas.spacegame.Asteroids.java
com.lpatalas.spacegame.CloudLayer.java
com.lpatalas.spacegame.Clouds.java
com.lpatalas.spacegame.DesktopStarter.java
com.lpatalas.spacegame.GameplayScreen.java
com.lpatalas.spacegame.MainMenuScreen.java
com.lpatalas.spacegame.Particles.java
com.lpatalas.spacegame.PlayerInputProcessor.java
com.lpatalas.spacegame.Player.java
com.lpatalas.spacegame.SpaceGameActivity.java
com.lpatalas.spacegame.SpaceGame.java
com.lpatalas.spacegame.Stars.java