diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-01-07 20:19:34 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-01-07 20:19:34 +0100 |
commit | a09b58b54c19673d3b699b069d0c7683053e27d3 (patch) | |
tree | d0360ebae6ffd5adaf780684ad428b5c519b154e /src/control | |
parent | f569eb788f0ac0f5d10e2b83e2f7f3c9cd0b2d68 (diff) | |
download | rpgedit-a09b58b54c19673d3b699b069d0c7683053e27d3.tar rpgedit-a09b58b54c19673d3b699b069d0c7683053e27d3.zip |
Simplify entity list
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/MapContext.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/MapContext.ts b/src/control/MapContext.ts index ce82c5a..48e8b9e 100644 --- a/src/control/MapContext.ts +++ b/src/control/MapContext.ts @@ -15,7 +15,7 @@ import MapView from '../view/MapView'; export default class MapContext { view: MapView; - entities: {[key: string]: EntityPosition} = {}; + entities: EntityPosition[] = []; playerEntity: EntityPosition; @@ -42,7 +42,7 @@ export default class MapContext { } private addEntity(entity: EntityPosition) { - this.entities[entity.position.asString()] = entity; + this.entities.push(entity); } private addTransition(entity: EntityPosition, dest: Position, start: number, dur: number) { |