Back to project page blocks-game.
The source code is released under:
Apache License
If you think the Android project blocks-game listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cz.kotu.game.blocks; /* w ww .j a v a 2 s .c o m*/ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Vector2; class Block { final Vector2 pos = new Vector2(); TextureRegion textureRegion = T.blockTextureRegion.get(5); Block() { } Block setPos(float x, float y) { pos.set(x, y); return this; } public TextureRegion getTextureRegion() { return textureRegion; } public void update() { } void draw(SpriteBatch batch) { batch.draw(getTextureRegion(), pos.x, pos.y, 1, 1); } }