fix clearing walls on restart/pause

This commit is contained in:
Kevin Ngo
2018-10-12 03:51:04 -07:00
parent 79bece00f0
commit e0b312e95e
2 changed files with 11 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ AFRAME.registerComponent('wall', {
this.maxZ = 10;
},
pause: function () {
this.el.object3D.visible = false;
},
tock: function (time, delta) {
this.el.object3D.position.z += this.data.speed * (delta / 1000);
this.returnToPool();