mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:14:35 +02:00
a couple more prints
This commit is contained in:
parent
82789113a8
commit
720175f862
1 changed files with 8 additions and 8 deletions
|
@ -17,22 +17,22 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initialize = function(entityId) {
|
this.initialize = function(entityId) {
|
||||||
print(' should initialize' + entityId)
|
//print(' should initialize' + entityId)
|
||||||
var properties = Entities.getEntityProperties(entityId);
|
var properties = Entities.getEntityProperties(entityId);
|
||||||
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) {
|
if (properties.userData.length === 0 || properties.hasOwnProperty('userData') === false) {
|
||||||
self.initTimeout = Script.setTimeout(function() {
|
self.initTimeout = Script.setTimeout(function() {
|
||||||
print(' no user data yet, try again in one second')
|
// print(' no user data yet, try again in one second')
|
||||||
self.initialize(entityId);
|
self.initialize(entityId);
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print(' userdata before parse attempt' + properties.userData)
|
//print(' userdata before parse attempt' + properties.userData)
|
||||||
self.userData = null;
|
self.userData = null;
|
||||||
try {
|
try {
|
||||||
self.userData = JSON.parse(properties.userData);
|
self.userData = JSON.parse(properties.userData);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
print(' error parsing json');
|
// print(' error parsing json');
|
||||||
print(' properties are:' + properties.userData);
|
// print(' properties are:' + properties.userData);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,12 +97,12 @@
|
||||||
y: event.y
|
y: event.y
|
||||||
});
|
});
|
||||||
if (clickedOverlay === self.button) {
|
if (clickedOverlay === self.button) {
|
||||||
print("button was clicked");
|
//print("button was clicked");
|
||||||
if (self.sound.downloaded) {
|
if (self.sound.downloaded) {
|
||||||
print("play sound");
|
//print("play sound");
|
||||||
Audio.playSound(self.sound, self.soundOptions);
|
Audio.playSound(self.sound, self.soundOptions);
|
||||||
} else {
|
} else {
|
||||||
print("not downloaded");
|
//print("not downloaded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue