()
| 47 | } |
| 48 | |
| 49 | load () { |
| 50 | this.supermodel.resetProgress() |
| 51 | this.loadStartTime = new Date() |
| 52 | if (this.levelLoader) { |
| 53 | this.stopListening(this.levelLoader) |
| 54 | this.levelLoader.destroy() |
| 55 | } |
| 56 | if (this.god) { |
| 57 | this.stopListening(this.god) |
| 58 | this.god.destroy() |
| 59 | } |
| 60 | this.god = new God({ maxAngels: 1, headless: true }) |
| 61 | this.levelLoader = new LevelLoader({ supermodel: this.supermodel, levelID: this.levelID, headless: true, fakeSessionConfig: { codeLanguage: this.language, callback: this.configureSession }, thangsOverride: this.options.thangsOverride }) |
| 62 | this.listenToOnce(this.levelLoader, 'world-necessities-loaded', function () { return _.defer(this.onWorldNecessitiesLoaded) }) |
| 63 | } |
| 64 | |
| 65 | onWorldNecessitiesLoaded () { |
| 66 | // Called when we have enough to build the world, but not everything is loaded |
no test coverage detected