如果没有 platform2 变量,玩家在降落到半固态平台时有时会抖动,这很烦人。我花了大概三天时间才搞出这堆烂代码,而且我自己也不满意。有没有什么办法能至少重写一下代码,让我只需要用到一个变量?

(place_meeting(x, y + 1, platform2) and floor(bbox_bottom) <= ceil(platform2.bbox_top)))

改为

(platform != noone and place_meeting(x, y + 1, platform) and floor(bbox_bottom) <= ceil(platform.bbox_top)))

不知为何反而让抖动更严重了。