Pygame doesn't let me use float for rect.move, but I need it

后端 未结 2 969
逝去的感伤
逝去的感伤 2020-11-27 23:36

I\'ve recently recreated a version of Lunar Lander (you know, the old retro game) in Python 3 and Pygame: my lander moves (̀̀̀rect.move) each frame along the y

2条回答
  •  攒了一身酷
    2020-11-28 00:30

    I haven't tested it myself so I am sorry if this does not work but I think python is taking the number as a string so instead of int(variable)

    You should do float(variable)

提交回复
热议问题