Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class DrawableBox2D extends Box2DSprite implements Comparable<DrawableBox2D> {
- Body body;
- public abstract void interact();
- public DrawableBox2D(TextureRegion initialSprite) {
- super(initialSprite);
- // if this is how you apply the unit scale you won't need it anymore
- // this.setScaleX(SuikoTestGame.scale);
- // this.setScaleY(SuikoTestGame.scale);
- }
- @Override
- public void draw(Batch spriteBatch) {
- draw(spriteBatch, body);
- }
- @Override
- public int compareTo(DrawableBox2D arg0) {
- return Float.compare(arg0.body.getPosition().y, this.body.getPosition().y);
- }
- @Override
- public float getY() {
- return this.body.getPosition().y;
- }
- @Override
- public float getX() {
- return this.body.getPosition().x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement