summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/view')
-rw-r--r--src/view/MapView.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/view/MapView.ts b/src/view/MapView.ts
index 5523f81..230ecf3 100644
--- a/src/view/MapView.ts
+++ b/src/view/MapView.ts
@@ -75,7 +75,7 @@ export default class MapView {
private entitySprites: {[key: string]: HTMLImageElement};
constructor(private map: MapData,
- private entities: {[key: string]: EntityPosition},
+ private entities: EntityPosition[],
private origin: EntityPosition,
private updateState: (time: number) => void) {
this.canvas = document.createElement('canvas');
@@ -91,7 +91,7 @@ export default class MapView {
this.tiles = tiles;
});
- var entitiesReady = loadEntities(this.getEntities()).then((entities) => {
+ var entitiesReady = loadEntities(this.entities).then((entities) => {
this.entitySprites = entities;
});
@@ -100,10 +100,6 @@ export default class MapView {
});
}
- private getEntities(): EntityPosition[] {
- return _.values<EntityPosition>(this.entities);
- }
-
private setSize() {
var e = document.documentElement;
var w = window.innerWidth || e.clientWidth || body.clientWidth;
@@ -197,7 +193,7 @@ export default class MapView {
var animate = false;
- this.getEntities().forEach(e => {
+ this.entities.forEach(e => {
if (this.drawEntity(e, time))
animate = true;
});