Constantly checking if a bullet has touched a node

前端 未结 3 1302
太阳男子
太阳男子 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:51

    In general, when you must "constantly observe" something in an OO language, the best solution is to use the Observer pattern.

提交回复
热议问题