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.
是否可以通过它的标签启用或禁用 CCMenuItemSprite?
例子:
itemSprite(tag)->setEnabled(false);
假设menu是您的项目的父项(可能是 CCMenu 类的对象)并且tag是您的标签,您可以执行以下操作:
CCNode *itemSprite = menu->getChildByTag(tag); itemSprite->setEnabled(false);