cocos2d 中重定向动画精灵的最佳实践是什么?

发布于 2024-08-09 16:50:07 字数 128 浏览 1 评论 0原文

我正在制作一款游戏,其中“防御”精灵需要向“攻击”精灵设置动画。 但例如,攻击者可能会在动画中改变路线来攻击其他物体。管理动画和目标的最佳方式是什么?我相信在添加新动作之前我必须删除对精灵的任何操作。也许我需要使用共享操作管理器或其他东西?

I am making a game where 'defending' sprites need to animate towards 'attacking' sprites.
But for example an attacker might change course to attack something else, mid animation. What's the best way to manage animations, and destinations? I believe I must remove any action on a sprite before adding a new one. Perhaps I need to use the shared action manager or something??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乞讨 2024-08-16 16:50:07

是的,只需停止现有的动作,并将新的动画添加到精灵中即可。

Yes, just stop the existing actions, and add the new animation to the sprite.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文