Update TutorialSpace.js

This commit is contained in:
Luis Fernando Molina committed 2020-09-25 11:44:29 +02:00
1 parent c5645a6b03
commit 1c2a335f6f
1 file changed
+18
+18
View File
@@ -61,6 +61,7 @@ function newTutorialSpace() {
let timeMachineKeyPressedCounter = 0
let keyPressedCounter = 0
let sliderPositioned = 0
let changeNodeConfigCounter = 0
return thisObject
@@ -407,6 +408,18 @@ function newTutorialSpace() {
currentNode.payload.referenceParent.payload.floatingObject.forceFocus()
forcingFocus = true
}
if (
config.changeNodeConfigReferenceParent !== undefined
) {
changeNodeConfigCounter++
if (changeNodeConfigCounter === 5) {
let nodeConfig = JSON.parse(currentNode.payload.referenceParent.config)
for (const property in config.changeNodeConfigReferenceParent) {
nodeConfig[property] = config.changeNodeConfigReferenceParent[property]
}
currentNode.payload.referenceParent.config = JSON.stringify(nodeConfig)
}
}
if (
config.menuActionReferenceParent !== undefined
) {
@@ -638,6 +651,7 @@ function newTutorialSpace() {
resetTimeMachineKeyPressed()
resetKeyPressed()
resetSlider()
changeNodeConfig()
function resetActions() {
lastExecutedAction = ""
@@ -672,6 +686,10 @@ function newTutorialSpace() {
function resetSlider() {
sliderPositioned = false
}
function changeNodeConfig() {
changeNodeConfigCounter = 0
}
}
function checkForceFocus() {