1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import EventEmitter from '../utils/eventEmitter';
import Enviroment from './enviroment';
import Map from './map';
 
export default class World extends EventEmitter  {
  constructor(experience) {
    super();
    this.experience = experience;
    this.scene = this.experience.scene;
    this.enviroment = new Enviroment(this.experience);
    this.map = new Map(this.experience);
  }
 
  update() {
    this.enviroment.update();
  }
  destroy() {
    this.enviroment.destroy();
    this.map.destroy();
  }
}