CodePudding user response:
1. Please do not use the UI to judge logic, but a logical manager to do this,2. When your tanks moved some distance, more than the threshold value of each grid, then you think tanks in the grid, then determine whether can through certain obstacles can use logical location information in the manager to do judgment,
, of course, if you capricious, you want to use the UI to process logic,
That please move every time distance is fixed, in particular, do not according to the duration of the button, to move the unit of distance, but every time after moving, lock button event, in the mobile, after the completion of a lattice to monitor events, so that it can be, do, of course, will make you can't walk snakeskin,