문제

I'm playing my game. While playing, I press the home button on my Android phone. Then I press the game Icon on my Android screen, and the game starts from beginning. I know there is OnApplicationPause. But what should I add there? How can I continue my game from the position where I left the game?

도움이 되었습니까?

해결책

really depends on your situation but basically save your gameState in onPause and load it in onResume Please read: http://developer.android.com/training/basics/activity-lifecycle/pausing.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top