overte/unpublishedScripts/marketplace/gameTable/resetGameButton.js
2017-04-17 13:16:10 +02:00

25 lines
671 B
JavaScript

(function() {
var _this;
function ResetGameButton() {
_this = this;
}
ResetGameButton.prototype = {
preload: function(id) {
_this.entityID = id;
},
clickDownOnEntity: function() {
_this.resetGame();
},
startNearTrigger: function() {
_this.resetGame();
},
startFarTrigger: function() {},
resetGame: function() {
print('reset game button calling resetGame');
Entities.callEntityMethod(Entities.getEntityProperties(_this.entityID, ['parentID']).parentID, 'resetGame');
}
};
return new ResetGameButton();
});