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.
我想在 cocos2d 中创建一个菜单,其中菜单项会在屏幕上漂移,消失,然后重新出现。我找不到任何显示 CCMenuItem 的动画或移动的东西。这可能吗?还是我会更好地使用 CCSprites 并创建功能以在触摸场景时切换场景?
您可以使用 CCMenuItemSprite(CCMenuItem 的子类)来实现这一点。继续创建你的精灵(如果你愿意,可以对它们应用动作),然后使用这些精灵来创建 CCMenuItemSprite。但是,如果您想稍后更改操作,则需要抓住指向 CCSprite 的指针——这就是控制操作(而不是 CCMenuItemSprite)的东西。