fix: body guards

This commit is contained in:
cha0s 2019-04-21 21:43:19 -05:00
parent e479128901
commit 8c1e8d8c1a

View File

@ -108,13 +108,13 @@ export class Physical extends decorate(Trait) {
return {
applyForce: (force) => {
if (this._world) {
if (this._world && this._body) {
this._body.applyForce(force);
}
},
applyImpulse: (impulse, elapsed) => {
if (this._world) {
if (this._world && this._body) {
this._body.applyImpulse(impulse, elapsed);
}
},