// // discoPillClient.js // Enables pill drop when disco ball is triggered // // Author: Elisa Lupin-Jimenez // Copyright High Fidelity 2018 // // Licensed under the Apache 2.0 License // See accompanying license file or http://apache.org/ // // All assets are under CC Attribution Non-Commerical // http://creativecommons.org/licenses/ // (function() { var _entityID; this.preload = function(entityID) { _entityID = entityID; }; this.mousePressOnEntity = function(entityID, mouseEvent) { if (mouseEvent.isLeftButton) { Entities.callEntityServerMethod(entityID, "dropPills"); } }; this.startFarTrigger = function() { Entities.callEntityServerMethod(_entityID, "dropPills"); }; });