(function() { var _this = null; // will be initialized on preload // define prototype AttackCube function AttackCube() { return; } AttackCube.prototype = { entityID: null, preload: function(entityID) { _this = this; _this.entityID = entityID; Script.include(Script.resolvePath('marketplaces.js?' + Date.now())); }, unload: function () { } }; // entity scripts should return a newly constructed object of our type return new AttackCube(); });