Android Open Source - Layrd Player






From Project

Back to project page Layrd.

License

The source code is released under:

MIT License

If you think the Android project Layrd 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.Voltronics.game;
//from  ww w  .  j a  va2s .  c  o m

public class Player extends GameObject{


    public enum state{IDLE, MOVING, DYING};
  public state plState = state.IDLE;
  
  public Player(float x, float y, float width, float height){


        super(Math.max(x/2, x),
        Math.max(y/2, y),
        Math.max(1, width),
        Math.max(1, height));
  }
  
  
  public void setPos(float x, float y){
    //this.position.x = Math.max(this.rectBounds.x/2, x);
    //this.position.y = Math.max(this.rectBounds.y/2, y);
    this.position.x = x;
        this.position.y = y;


    sprite.setPosition(x, y);
  }

}




Java Source Code List

com.Voltronics.game.GameObject.java
com.Voltronics.game.LayrdGame.java
com.Voltronics.game.LayrdGoogleGameInterface.java
com.Voltronics.game.LayrdGraphics.java
com.Voltronics.game.LayrdInput.java
com.Voltronics.game.LayrdLogic.java
com.Voltronics.game.LayrdPhysics.java
com.Voltronics.game.LayrdScreenGame.java
com.Voltronics.game.LayrdScreenMainMenu.java
com.Voltronics.game.LayrdSound.java
com.Voltronics.game.LayrdWorld.java
com.Voltronics.game.Player.java
com.Voltronics.game.TutorialScreen.java
com.Voltronics.game.android.AndroidLauncher.java
com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.GameHelperUtils.java
com.google.example.games.basegameutils.GameHelper.java