0

抱歉,如果这听起来太简单,但我无法找到解决方案。我在我的游戏中使用了多个图层。如何确定图层是否已添加到场景中?

4

1 回答 1

0

试试这个,假设你的 [MenuManager sharedMenuManager] 是有问题的层:

if (![MenuManager sharedMenuManager].parent) {
    // has not been added before
}
于 2013-09-20T19:40:00.557 回答