2026/4/18 13:43:42
网站建设
项目流程
桂林生活网官方网站,成都软件培训机构排名榜,改革开放40周年网站发展建设,设计师服务平台素材羊其实使用和unity基本一样#xff0c;但是代码写法有点不一样#xff0c;unity的话只用直接写事件函数 onTriggerEnter或者 onCollisionEnter就好#xff0c;但是cocos不仅要写#xff0c;还要在start方法里绑定start() {this.collider this.node.getComponent(Collider…其实使用和unity基本一样但是代码写法有点不一样unity的话只用直接写事件函数 onTriggerEnter或者 onCollisionEnter就好但是cocos不仅要写还要在start方法里绑定start() {this.collider this.node.getComponent(Collider);//需要这么用Collider或者是Triggerthis.collider.on(onTriggerEnter, this.onTriggerEnter, this);}onTriggerEnter(self) {}