update (dt) {
console.error("log update");
}
cc.director.getScheduler()里面的方法都没有效果
@jare 请指教,谢谢。cocos 2d 里面有 unschedulerUpdate,schedulerUpdate。creator 里面有类似方法吗?
update (dt) {
console.error("log update");
}
cc.director.getScheduler()里面的方法都没有效果
@jare 请指教,谢谢。cocos 2d 里面有 unschedulerUpdate,schedulerUpdate。creator 里面有类似方法吗?
哪怕你稍微看了下官方文档手册也不会问这种问题
更改 组件 enable
isUpdate = true;
update(dt) {
if(!this.isUpdate) return;
}
截图给我看看嘛,我眼瞎。谢谢!
这个可以实现,但是意味着这个组件也停用。
谢谢 !!!!
这种方式可以使用,但是不太好,个人建议写一个方法装饰器,改写函数体,获取this属性判断是否执行