mirror of
https://github.com/overte-org/overte.git
synced 2025-04-13 04:49:43 +02:00
25 lines
671 B
JavaScript
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();
|
|
});
|