Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有 4sprite 显示左、右、上、下,我使用网格路径运动进行运动,所以我想像这样
如果 playerobject 向左走,改变 spr_left
如何在gridpath中制作它?
您必须检查玩家的最后方向是什么;
if (x < xprevious) { sprite_index = spr_right; } if (x > xprevious) { sprite_index = spr_left; } if (y < yprevious) { sprite_index = spr_up; } if (y > yprevious) { sprite_index = spr_down; }