(function() { var TestCube = function() { }; function printID(id, event) { print(id); } TestCube.prototype = { clickDownOnEntity: function(entityID, mouseEvent) { printID(entityID); }, startFarTrigger: function() { printID(); } }; return new TestCube(); });