Showing the changes to scripts/developer/tests/basicEntityTest/myEntityScript.js (1 of 73 files). Show all
Unified · Split
| @@ -0,0 +1,24 @@ | |||
| 1 | |||
| 2 | (function() { | ||
| 3 | var _this; | ||
| 4 | MyEntity = function() { | ||
| 5 | _this = this; | ||
| 6 | |||
| 7 | }; | ||
| 8 | |||
| 9 | MyEntity.prototype = { | ||
| 10 | |||
| 11 | |||
| 12 | preload: function(entityID) { | ||
| 13 | this.entityID = entityID; | ||
| 14 | var randNum = Math.random().toFixed(3); | ||
| 15 | print("EBL PRELOAD ENTITY SCRIPT!!!", randNum) | ||
| 16 | |||
| 17 | }, | ||
| 18 | |||
| 19 | |||
| 20 | }; | ||
| 21 | |||
| 22 | // entity scripts always need to return a newly constructed object of our type | ||
| 23 | return new MyEntity(); | ||
| 24 | }); | ||