I am creating a Component and in it I might need to call some other component's method, but I don't know in advance, which component it will be, so I guess "cc.Event"
is the best candidate for my task.
When I do it this way, it won't work:
@ccclass
export default class Helloworld extends cc.Component {
@property({ type: cc.Event })
public event: cc.Event = new cc.Event("", true);
}
But I'd like to do it just like we have it in CCButton:
How can I achieve that? I looked up in CCButton
sources, I can see that it points to inspector.js
, but I could not find this inspector file anywhere.