XNA 将精灵捕捉到图块地图
我正在寻找有关如何处理将精灵捕捉到图块地图的最佳选择。我正在尝试克隆楚楚火箭。如果你不了解这个游戏。这是一款基于图块的游戏,您可以在特定图块上放置箭头来引导地图周围的物体。因此,我需要始终将精灵捕捉到图块的中心,然后检测与占据整个图块或墙壁或其他障碍物的箭头的碰撞。关于检测这些东西的基本方法是什么的任何想法,因为我相信它需要不同类型的碰撞检测。
I'm looking for the best option on how to handle snapping sprites to a tilemap. I'm trying to make a Chu Chu Rocket clone. If you dont know the game. It is a tilebased game where you place arrows on a specfic tile to direct unts around the maps. So I need to snap the sprites to the center of the tile at all times and then detect a collision with either an arrow which takes up a whole tile or a wall or other obstruction. Any ideas on what the based way would be to detect those things since it would require different kinds of collision detection i believe.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将精灵捕捉到图块的最简单方法是将它们绘制在图块的中心。碰撞检测可以在更新函数中通过检查关卡对象来完成。
The easiest way to snap the sprites to a tile is to draw them centered at a tile. The collision detection can be done in your update function by checking against your level object.