mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
21 lines
369 B
TypeScript
21 lines
369 B
TypeScript
import { PhysicsWorld } from './world';
|
|
|
|
export class PhysicsSystem {
|
|
private _world: PhysicsWorld;
|
|
|
|
constructor () {
|
|
this._world = new PhysicsWorld();
|
|
}
|
|
|
|
public update (deltaTime: number) {
|
|
if (CC_EDITOR) {
|
|
return;
|
|
}
|
|
this._world.step(deltaTime);
|
|
}
|
|
|
|
get world () {
|
|
return this._world;
|
|
}
|
|
}
|