0
\$\begingroup\$

I'd like to know if someone has already used Actions in the actors, and how to use them. I don't know how. I want to rotate an Actor.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The API is Actor.action(Action action), that will add an action to the Actor and it will be updated when Actor.act(delta) is called.

Here is an example code to rotate 90 degrees in 5 seconds a window:

Window window = new Window(...); window.action(RotateTo.$(90, 5f)); 

This will automatically works if you have the widget on the Stage and you are calling stage.act(delta) correctly. Otherwise you will have to call Actor.act(delta) by yourself.

Hope it helps.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.