Why are touch events destroying my Android framerate?

前端 未结 5 1805
傲寒
傲寒 2020-12-25 15:44

I\'m developing a game for Android. It\'s got a lot going on but is running reasonably smoothly. That is, of course, until the user touches the screen.

While they\'r

5条回答
  •  借酒劲吻你
    2020-12-25 15:58

    If you want a solution without having to deal with synchronizing threads I can recommend using the Handler interface to send the event and relevant data using a Message/Bundle to the game rendering thread. The sleep workaround hinted here still applies.

提交回复
热议问题