1
\$\begingroup\$

I have a method, which runs the action MenuScreen at the very end. It never fires. Why is that?

fun method() { scene.addSegment(SceneSegment(theEnd, Actions.fadeIn(4f))) scene.addSegment(SceneSegment(background, Actions.delay(10f))) scene.addSegment(SceneSegment(background, Actions.run { MenuScreen() })) scene.start() } 

theEnd fades in properly, but the MenuScreen is never called.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You're passing the result of calling MenuScreen() as your call back. What does that function return? Perhaps you meant simply MenuScreen, which is a function. Other than that I can't tell what's wrong.

\$\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.