Skip to main content
deleted 6 characters in body
Source Link

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

And for alpha actions: (this myActor draw method)

batch.begin(); // Store old batch alpha temp = batch.getColor(); // Set new alpha to the batch batch.setColor(new Color(temp.r, temp.g, temp.b, actorAlpha)); // Draw your actor batch.draw(texture, getX(), getY(), getSizegetOriginX().x / 2, getSizegetOriginY().y / 2, texture.getRegionWidth(), texture.getRegionHeight(), 1, 1, getRotation()); // Restore old batch color batch.setColor(temp); batch.end(); 

Where temp is a Color.

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

And for alpha actions: (this myActor draw method)

batch.begin(); // Store old batch alpha temp = batch.getColor(); // Set new alpha to the batch batch.setColor(new Color(temp.r, temp.g, temp.b, actorAlpha)); // Draw your actor batch.draw(texture, getX(), getY(), getSize().x / 2, getSize().y / 2, texture.getRegionWidth(), texture.getRegionHeight(), 1, 1, getRotation()); // Restore old batch color batch.setColor(temp); batch.end(); 

Where temp is a Color.

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

And for alpha actions: (this myActor draw method)

batch.begin(); // Store old batch alpha temp = batch.getColor(); // Set new alpha to the batch batch.setColor(new Color(temp.r, temp.g, temp.b, actorAlpha)); // Draw your actor batch.draw(texture, getX(), getY(), getOriginX(), getOriginY(), texture.getRegionWidth(), texture.getRegionHeight(), 1, 1, getRotation()); // Restore old batch color batch.setColor(temp); batch.end(); 

Where temp is a Color.

added 531 characters in body
Source Link

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

And for alpha actions: (this myActor draw method)

batch.begin(); // Store old batch alpha temp = batch.getColor(); // Set new alpha to the batch batch.setColor(new Color(temp.r, temp.g, temp.b, actorAlpha)); // Draw your actor batch.draw(texture, getX(), getY(), getSize().x / 2, getSize().y / 2, texture.getRegionWidth(), texture.getRegionHeight(), 1, 1, getRotation()); // Restore old batch color batch.setColor(temp); batch.end(); 

Where temp is a Color.

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation) 

And for alpha actions: (this myActor draw method)

batch.begin(); // Store old batch alpha temp = batch.getColor(); // Set new alpha to the batch batch.setColor(new Color(temp.r, temp.g, temp.b, actorAlpha)); // Draw your actor batch.draw(texture, getX(), getY(), getSize().x / 2, getSize().y / 2, texture.getRegionWidth(), texture.getRegionHeight(), 1, 1, getRotation()); // Restore old batch color batch.setColor(temp); batch.end(); 

Where temp is a Color.

Source Link

You need to draw you actor with a method that handle rotation

void draw(TextureRegion region, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)