hook up pause menu actions (resume, restart, exit), but still need to force beats to reposition off audio.currentTime
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
AFRAME.registerComponent('saber-controls', {
|
||||
schema: {
|
||||
bladeEnabled: {default: false},
|
||||
hand: {default: 'right', oneOf: ['left', 'right']}
|
||||
hand: {default: 'right', oneOf: ['left', 'right']},
|
||||
isPaused: {default: false}
|
||||
},
|
||||
|
||||
init: function () {
|
||||
@@ -24,6 +25,9 @@ AFRAME.registerComponent('saber-controls', {
|
||||
update: function (oldData) {
|
||||
if (!oldData.bladeEnabled && this.data.bladeEnabled) {
|
||||
this.bladeEl.emit('drawblade');
|
||||
if (!oldData.isPaused) {
|
||||
this.bladeEl.emit('drawbladesound');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user