summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-01-07 20:19:34 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-01-07 20:19:34 +0100
commita09b58b54c19673d3b699b069d0c7683053e27d3 (patch)
treed0360ebae6ffd5adaf780684ad428b5c519b154e /src/control
parentf569eb788f0ac0f5d10e2b83e2f7f3c9cd0b2d68 (diff)
downloadrpgedit-a09b58b54c19673d3b699b069d0c7683053e27d3.tar
rpgedit-a09b58b54c19673d3b699b069d0c7683053e27d3.zip
Simplify entity list
Diffstat (limited to 'src/control')
-rw-r--r--src/control/MapContext.ts4
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) {