Constantly checking if a bullet has touched a node

前端 未结 3 1303
太阳男子
太阳男子 2020-11-30 13:13

I have a very simple program where you can use your W, A, S, D and space keys to shoot. All of the shooting and movin

3条回答
  •  悲哀的现实
    2020-11-30 13:59

    What you need is something that will check for collision every time you draw a frame in your game. A timer would run in a separate thread which could work, but would be much harder to synchronize with the game.

提交回复
热议问题