Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CoinTexture extends Actor {
- @Override
- public void draw(Batch batch, float parentAlpha) {
- batch.draw(game.Coin, getX(),getY(), getWidth(), getHeight());
- super.draw(batch, parentAlpha);
- }
- Rectangle bounds;
- public CoinTexture() {
- bounds=new Rectangle((int)getX(), (int)getY(), (int)getWidth(), (int)getHeight());
- }
- public Rectangle getBounds() {
- return bounds;
- }
- private void setXY(float pX,float pY) {
- setPosition(pX, pY);
- bounds.setX((int) pX);
- bounds.setY((int) pY);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement