content/hifi-content/rebecca/testing_utils/mousePressCallServer/mousePressCallServerDebug_client.js
2022-02-14 02:04:11 +01:00

23 lines
No EOL
564 B
JavaScript

(function() {
var _this;
var TestEntity = function() {
_this = this;
};
TestEntity.prototype = {
preload: function(entityID) {
_this.entityID = entityID;
},
mousePressOnEntity: function(entityID, event) {
print("Client script has received a mouse press: ", JSON.stringify(event));
if (event.isPrimaryButton) {
Entities.callEntityServerMethod(_this.entityID, "mousePressed");
}
}
};
return new TestEntity();
});