方法didLoadFromCCB在哪里:从C​​ocos2d v3? [英] Where does the method didLoadFromCCB: come from in Cocos2d v3?

查看:129
本文介绍了方法didLoadFromCCB在哪里:从C​​ocos2d v3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个名为 didLoadFromCCB 的方法,您可以为在SpriteBuilder中创建的任何类实现。这个方法在Cocos2d从CCB文件加载类时调用。

There's a method called didLoadFromCCB that you can implement for any class that has been created in SpriteBuilder. This method is called when Cocos2d loads the class from a CCB file.

我想知道的是:这个方法来自哪里?

What I want to know is: where does this method come from?

Xcode似乎不知道它存在,因为它没有自动完成。

Xcode doesn't seem to know it exists, as it doesn't autocomplete.

我没有任何问题的方法,它被调用,一切正常工作,我只想知道它来自哪里。

I'm not having any problems with the method, it's getting called and everything is working perfectly, I'd just like to know where it comes from.

此外,我想知道是否有任何文档列出了可以从CCB文件加载的类中调用的方法。

Also, I'd like to know if there is any documentation that lists methods like this that can be called on classes loaded from CCB files. I've had a look around www.spritebuilder.com, but there doesn't seem to be anything of that nature.

推荐答案

CCBReader发送此消息。你可以在xcode中搜索项目,如果你需要找到它的确切起源。

CCBReader sends this message. You can search the project in xcode if you need to find its exact origin.

错误的是,这个方法没有在任何CCBReader头声明和isn' t在协议中,因此Xcode不会自动完成它,因为它被认为是一个私有方法。这将最终修复。

The mistake is that this method wasn't declared in any of the CCBReader headers and isn't in a protocol either, therefore Xcode won't autocomplete it because it's considered a private method. This will be fixed eventually.

除了代码本身之外,目前还没有CCNReader文档。但是didLoadFromCCB是CCBReader将发送到节点的唯一方法。

There is currently no CCNReader documentation besides the code itself. But didLoadFromCCB is the only method CCBReader will send to nodes.

EDIT :我打开了一个关于didLoadFromCCB的自动完成问题,它也困扰我了。

EDIT: I opened an issue regarding autocomplete of didLoadFromCCB, it's been bothering me too.

这篇关于方法didLoadFromCCB在哪里:从C​​ocos2d v3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆