pull/1/head
Evan Hemsley 2019-05-22 14:46:09 -07:00
parent 0de27d7817
commit 04d260ff36
1 changed files with 7 additions and 7 deletions

View File

@ -13,19 +13,19 @@ The WorldBuilder uses Engines and their Message read/emit information to determi
Here is an example usage: Here is an example usage:
```ts ```ts
import { WorldBuilder } from "encompass-ecs";
import { CanvasComponent } from "./components/canvas";
import { PositionComponent } from "./components/position";
import { VelocityComponent } from "./components/velocity";
import { MotionEngine } from "./engines/motion";
import { CanvasRenderer } from "./renderers/canvas";
class Game { class Game {
private World world; private World world;
... ...
public load() { public load() {
import { WorldBuilder } from "encompass-ecs";
import { CanvasComponent } from "./components/canvas";
import { PositionComponent } from "./components/position";
import { VelocityComponent } from "./components/velocity";
import { MotionEngine } from "./engines/motion";
import { CanvasRenderer } from "./renderers/canvas";
const world_builder = new WorldBuilder(); const world_builder = new WorldBuilder();
world_builder.add_engine(MotionEngine); world_builder.add_engine(MotionEngine);