mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-10 15:55:53 +08:00
22 lines
309 B
TypeScript
22 lines
309 B
TypeScript
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class PhysicsMgr extends cc.Component {
|
|
|
|
@property
|
|
enabeld = true;
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
onLoad() {
|
|
cc.director.getPhysicsManager().enabled = this.enabeld;
|
|
}
|
|
|
|
start() {
|
|
|
|
}
|
|
|
|
// update (dt) {}
|
|
}
|