From ec93fc1b05c1e49da3e01381110f7f61e519bc08 Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Wed, 9 Sep 2015 14:24:52 -0700 Subject: [PATCH] added some debugging to breakdance toy --- examples/entityScripts/breakdanceEntity.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/entityScripts/breakdanceEntity.js b/examples/entityScripts/breakdanceEntity.js index ece3e57062..332c381e39 100644 --- a/examples/entityScripts/breakdanceEntity.js +++ b/examples/entityScripts/breakdanceEntity.js @@ -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 (grabData.activated && grabData.avatarId == MyAvatar.sessionUUID) { - + //print("BreakdanceEntity.update() [I'm being grabbed] _this.entityID:" + _this.entityID); if (!_this.beingGrabbed) { + print("I'm was grabbed... _this.entityID:" + _this.entityID); + // remember we're being grabbed so we can detect being released _this.beingGrabbed = true; var props = Entities.getEntityProperties(entityID); var puppetPosition = getPuppetPosition(props); breakdanceStart(props.modelURL, puppetPosition); - print("I'm was grabbed..."); } else { breakdanceUpdate(); } @@ -62,7 +63,7 @@ // if we are not being grabbed, and we previously were, then we were just released, remember that // and print out a message _this.beingGrabbed = false; - print("I'm was released..."); + print("I'm was released... _this.entityID:" + _this.entityID); breakdanceEnd(); } }, @@ -73,6 +74,7 @@ // * connecting to the update signal so we can check our grabbed state preload: function(entityID) { this.entityID = entityID; + print("BreakdanceEntity.preload() this.entityID:" + this.entityID); 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 // to the update signal unload: function(entityID) { + print("BreakdanceEntity.unload() this.entityID:" + this.entityID); Script.update.disconnect(this.update); },