If you think the Android project Stickman 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.wireframe.stickman;
/*www.java2s.com*/import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
publicclass Ladder extends GameObject{
private Texture texture;
private TextureRegion textureRegion;
public Ladder(int x, int y, int z, int h) {
this(new Vector3(x,y,z), h);
}
public Ladder(Vector3 position, int height) {
super(position, new Vector2(50,height) );
texture = StickmanResources.getImage("ladder.png");
textureRegion = new TextureRegion(texture);
textureRegion.setRegion(0,0,texture.getWidth(),height);
}
publicvoid update(){
}
publicvoid draw(SpriteBatch batch){
batch.draw(textureRegion, getX(), getY(), getWidth(), getHeight());
}
@Override
publicvoid dispose() {
texture.dispose();
}
}