Android Open Source - bbg-gdx-project-setup Player






From Project

Back to project page bbg-gdx-project-setup.

License

The source code is released under:

MIT License

If you think the Android project bbg-gdx-project-setup 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.bluebananagames.gametemplate.game;
/* w w w .  j ava  2s  .c om*/
import com.badlogic.gdx.math.Vector2;
import com.bluebananagames.gametemplate.input.InputHandler;

public class Player {

  public static float HORIZONTAL_SPEED = 100;

  private Vector2 position = new Vector2();
  private InputHandler inputHandler;
  private PlayerColor color;

  public Vector2 getPosition() {
    return position;
  }

  public void setPosition(float x, float y) {
    this.position.set(x, y);
  }

  public void setX(float x) {
    position.x = x;
  }

  public void setY(float y) {
    position.y = y;
  }

  public InputHandler getInputHandler() {
    return inputHandler;
  }

  public void setInputHandler(InputHandler inputHandler) {
    this.inputHandler = inputHandler;
  }

  public PlayerColor getColor() {
    return color;
  }

  public void setColor(PlayerColor color) {
    this.color = color;
  }
}




Java Source Code List

com.bluebananagames.gametemplate.Assets.java
com.bluebananagames.gametemplate.GameTemplateGame.java
com.bluebananagames.gametemplate.MainActivity.java
com.bluebananagames.gametemplate.Main.java
com.bluebananagames.gametemplate.game.PlayerColor.java
com.bluebananagames.gametemplate.game.Player.java
com.bluebananagames.gametemplate.input.Control.java
com.bluebananagames.gametemplate.input.ControllerInputHandler.java
com.bluebananagames.gametemplate.input.InputHandler.java
com.bluebananagames.gametemplate.input.InputMapping.java
com.bluebananagames.gametemplate.input.KeyboardInputHandler.java
com.bluebananagames.gametemplate.render.WorldRenderer.java
com.bluebananagames.gametemplate.screen.AbstractScreen.java
com.bluebananagames.gametemplate.screen.GameScreen.java