Android Open Source - AndroidShooter Character






From Project

Back to project page AndroidShooter.

License

The source code is released under:

GNU General Public License

If you think the Android project AndroidShooter 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 jonathan.geoffroy.shooter.model.characters;
//from www. ja  va  2  s. c o m
import jonathan.geoffroy.shooter.model.Map;

import com.badlogic.gdx.Gdx;


public class Character {
  private Coord2F position;

  public Character(int terrainX, int terrainY) {
    float terrainWidth = Gdx.graphics.getWidth() / Map.NB_TERRAINS_X;
    float terrainHeight = Gdx.graphics.getHeight() / Map.NB_TERRAINS_Y;
    position = new Coord2F(
        terrainX * terrainWidth,
        terrainY * terrainHeight + Gdx.graphics.getHeight()
        );
  }
  
  public Coord2F getPosition() {
    return position;
  }

  public void setPosition(Coord2F position) {
    this.position = position;
  }
  
}




Java Source Code List

jonathan.geoffroy.shooter.MainActivity.java
jonathan.geoffroy.shooter.Main.java
jonathan.geoffroy.shooter.Shooter.java
jonathan.geoffroy.shooter.model.Bullet.java
jonathan.geoffroy.shooter.model.Map.java
jonathan.geoffroy.shooter.model.characters.Character.java
jonathan.geoffroy.shooter.model.characters.Coord2F.java
jonathan.geoffroy.shooter.view.actors.CharacterActor.java
jonathan.geoffroy.shooter.view.actors.JoystickActor.java
jonathan.geoffroy.shooter.view.actors.MapActor.java
jonathan.geoffroy.shooter.view.screens.GameScreen.java
jonathan.geoffroy.shooter.view.screens.LevelScreen.java
jonathan.geoffroy.shooter.view.screens.MainMenuScreen.java
jonathan.geoffroy.shooter.view.utils.App.java
jonathan.geoffroy.shooter.view.utils.HelpScreen.java
jonathan.geoffroy.shooter.view.utils.ListActor.java
jonathan.geoffroy.shooter.view.utils.StageScreen.java
jonathan.geoffroy.shooter.view.utils.TableActor.java
jonathan.geoffroy.shooter.view.utils.WallpaperActor.java