package com.tilegame.sprites;


   The Player.
  • /
  public class Player extends Creature {
     private static final float JUMP_SPEED = -.95f;
     public boolean onGround;
     public Player(Animation left, Animation right,
       Animation deadLeft, Animation deadRight, 
       Animation runLeft, Animation runRight,
       Animation jumpLeft, Animation jumpRight,
       Animation punchLeft, Animation punchRight)
        super(left, right, deadLeft, deadRight, runLeft, 
           runRight, jumpLeft, jumpRight, punchLeft, punchRight);
     public void collideHorizontal() {
     public void collideVertical() {
       // check if collided with ground
        if (getVelocityY() > 0) {
           onGround = true;


     public void setY(float y) {
       // check if falling
        if (Math.round(y) > Math.round(getY())) {
           onGround = false;
     public void wakeUp() {
       // do nothing
       Makes the player jump if the player is on the ground or
       if forceJump is true.
     public void jump(boolean forceJump) {
        if (onGround || forceJump) {
           onGround = false;
        	//this.anim = this.jumpRight;

public void hasAttacked(){

     public float getMaxSpeed() {
        return 0.5f;

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.