拉斐尔 RPG/横向卷轴游戏动作
据我了解,当我想在屏幕上移动一个对象时,我可以使用 .animate 函数将其移动到我想要的位置,例如
R = Raphael( ... );
c = R.circle( ... );
c.animate( ... );
将按照我的参数中指定的 c.animate( .. ) 移动圆圈。
然而,如果我想翻译几乎所有的对象(想想 Gameboy 上的 Pokemon 或经典的 Mario 平台游戏,当玩家移动时,玩家精灵实际上保持原状,而世界的其他部分则移动),该怎么办?完成了吗?移动每个对象或调用 .clear() 并从头开始绘制所有内容是唯一的方法吗?一定有更好的方法吧?
From what I understand, when I want to move an object, on the screen, I can use the .animate function to move it to where I want, e.g.
R = Raphael( ... );
c = R.circle( ... );
c.animate( ... );
would move the circle as specified in my arguments to c.animate( .. ).
However, if I want to translate almost all of my objects, (think, Pokemon on Gameboy or classic Mario platformer, where when the player moves, the player sprite actually stays put, and the rest of the world moves instead), how would it be done? Is the only way to do this by moving every object or by calling .clear() and drawing everything from scratch? There has to be a better way right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论