mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:16:16 +02:00
added some debugging to breakdance toy
This commit is contained in:
parent
427ed8807b
commit
ec93fc1b05
1 changed files with 6 additions and 3 deletions
|
@ -45,14 +45,15 @@
|
||||||
|
|
||||||
// if the grabData says we're being grabbed, and the owner ID is our session, then we are being grabbed by this interface
|
// if the grabData says we're being grabbed, and the owner ID is our session, then we are being grabbed by this interface
|
||||||
if (grabData.activated && grabData.avatarId == MyAvatar.sessionUUID) {
|
if (grabData.activated && grabData.avatarId == MyAvatar.sessionUUID) {
|
||||||
|
//print("BreakdanceEntity.update() [I'm being grabbed] _this.entityID:" + _this.entityID);
|
||||||
if (!_this.beingGrabbed) {
|
if (!_this.beingGrabbed) {
|
||||||
|
print("I'm was grabbed... _this.entityID:" + _this.entityID);
|
||||||
|
|
||||||
// remember we're being grabbed so we can detect being released
|
// remember we're being grabbed so we can detect being released
|
||||||
_this.beingGrabbed = true;
|
_this.beingGrabbed = true;
|
||||||
var props = Entities.getEntityProperties(entityID);
|
var props = Entities.getEntityProperties(entityID);
|
||||||
var puppetPosition = getPuppetPosition(props);
|
var puppetPosition = getPuppetPosition(props);
|
||||||
breakdanceStart(props.modelURL, puppetPosition);
|
breakdanceStart(props.modelURL, puppetPosition);
|
||||||
print("I'm was grabbed...");
|
|
||||||
} else {
|
} else {
|
||||||
breakdanceUpdate();
|
breakdanceUpdate();
|
||||||
}
|
}
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
// if we are not being grabbed, and we previously were, then we were just released, remember that
|
// if we are not being grabbed, and we previously were, then we were just released, remember that
|
||||||
// and print out a message
|
// and print out a message
|
||||||
_this.beingGrabbed = false;
|
_this.beingGrabbed = false;
|
||||||
print("I'm was released...");
|
print("I'm was released... _this.entityID:" + _this.entityID);
|
||||||
breakdanceEnd();
|
breakdanceEnd();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
// * connecting to the update signal so we can check our grabbed state
|
// * connecting to the update signal so we can check our grabbed state
|
||||||
preload: function(entityID) {
|
preload: function(entityID) {
|
||||||
this.entityID = entityID;
|
this.entityID = entityID;
|
||||||
|
print("BreakdanceEntity.preload() this.entityID:" + this.entityID);
|
||||||
Script.update.connect(this.update);
|
Script.update.connect(this.update);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -80,6 +82,7 @@
|
||||||
// or because we've left the domain or quit the application. In all cases we want to unhook our connection
|
// or because we've left the domain or quit the application. In all cases we want to unhook our connection
|
||||||
// to the update signal
|
// to the update signal
|
||||||
unload: function(entityID) {
|
unload: function(entityID) {
|
||||||
|
print("BreakdanceEntity.unload() this.entityID:" + this.entityID);
|
||||||
Script.update.disconnect(this.update);
|
Script.update.disconnect(this.update);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue