想要用mixins继续cc.EventTarget的功能,我的代码是像下面这样写的;但是emit中会提示我不存在这个方法。正确的写法是怎么样的呢?
JS 的限制,要用 ES5 的写法才支持 mixin。
3.x 的话,可以用 eventify 这个 API 绕过这个问题 https://docs.cocos.com/creator/3.8/api/zh/function/Eventify
多重继承 = 坑
我是Creator 2.4.x;是说要用cc.Class那种方式吗?
是的,那种方式的话才支持 mixin