From 5442ffaf3eefee5ec8be5c9f687cc60b78cd4672 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 12 May 2016 16:58:29 -0700 Subject: [PATCH] glow light --- .../DomainContent/Home/reset.js | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index fc3bd88bbf..a488562a66 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -105,6 +105,57 @@ }); }, + tidyGlowActive: function() { + print('tidy glow active') + var res = Entities.findEntities(MyAvatar.position, 30); + var glow = null; + res.forEach(function(item) { + var props = Entities.getEntityProperties(item); + if (props.name === "Tidyguy-Glow") { + glow = item; + } + + + }) + if (glow !== null) { + print('editing glow' + glow) + Entities.editEntity(glow, { + color: { + red: 255, + green: 140, + blue: 20 + } + }) + } + }, + + tidyGlowDefault: function() { + print('tidy glow default') + + var res = Entities.findEntities(MyAvatar.position, 30); + var glow = null; + res.forEach(function(item) { + var props = Entities.getEntityProperties(item); + if (props.name === "Tidyguy-Glow") { + glow = item; + } + + }); + + if (glow !== null) { + print('editing glow' + glow) + + Entities.editEntity(glow, { + + color: { + red: 92, + green: 255, + blue: 209 + } + }) + } + }, + showTidyButton: function() { var data = { "Texture": "atp:/Tidyguy-4d.fbx/Tidyguy-4d.fbm/Tidy-Swipe-Sticker.jpg", @@ -146,11 +197,13 @@ } else { _this.tidying = true; _this.showTidyingButton(); + _this.tidyGlowActive(); _this.playTidyingSound(); _this.flickerEyes(); _this.findAndDeleteHomeEntities(); Script.setTimeout(function() { _this.showTidyButton(); + _this.tidyGlowDefault(); _this.tidying = false; }, 2500);