开发者

Android Question (for game)

I have a game, at the end i show a "Game Over" if the player does not follow some instructions.... the problem is android seems to stay on that state, when i go back to the menu and come back in.. i still dont have a way to play again, the ga开发者_如何学Pythonme is coded in the main activity and has Runnables and OnTouch events, also I have a splash screen that when click it goes to the other activity where the game starts.... I am new to Android, what is the best way to terminate the Thread and then send them to the first Activity or splash screen?

Thank you in advance


It's very difficult to help without seeing any code. However, an Activity can self-terminate by calling finish(), if that's what you're asking.


If you use static variables they will be 'remembered' unless explicitly set in the View constructor or onSizeChanged etc. For example x = x + 5, can increase x every time you start the same game if x is static, because it 'remembers' x from the previous play - one needs to be aware of this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜