Search Results

Search found 1 results on 1 pages for 'gigi10012'.

Page 1/1 | 1 

  • LibGdx, Texture an Object

    - by Gigi10012
    I want to set texture to an Object, this is my playerobject class: private boolean up; private float speed; private float fallacceleration = 20; private float acceleration = 15; private float maxSpeed = 300; SpriteBatch batch; public Player() { x = MyGdxGame.WIDTH - 9*MyGdxGame.WIDTH/10; y = MyGdxGame.HEIGHT - 3 * MyGdxGame.HEIGHT/10; shapex = new float[4]; shapey = new float[4]; radians = 2*MathUtils.PI; batch = new SpriteBatch(); } private void setShape() { //Simple Arrow Shape ...... } public void update(float dt) { setShape(); } public void draw(ShapeRenderer sr) { sr.setColor(0F, 0F, 0F, 1F); sr.begin(ShapeType.Line); //Drawing Shape .............. sr.end(); } What I have to do to add texture to that object? (I'm using LibGdx)

    Read the article

1