aboutsummaryrefslogtreecommitdiff
path: root/Tile.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-23 16:09:47 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-23 16:09:47 +0200
commit277157b3e06b2deeacbdbc8bf6190de19f88169d (patch)
treedb9c013b67f93d27fa5bb9cf84c7d6dc53f72734 /Tile.cpp
parent64028952ceb17f97ded08f1ab7ec0b06c41e2b87 (diff)
more refactoring / preparation for pathfinding
Diffstat (limited to 'Tile.cpp')
-rw-r--r--Tile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tile.cpp b/Tile.cpp
index 5172c24..cd1e820 100644
--- a/Tile.cpp
+++ b/Tile.cpp
@@ -18,8 +18,10 @@ void Tile::set_type(const string & type) {
void Tile::set_data(TileData & data) {
this->data = data;
- this->color = TileColorFactory::get_color(this->data.type);
- this->behavior = TileBehaviorFactory(this->museum).create(this->data.type);
+
+ Canvas & canvas = this->museum.canvas;
+ this->color = canvas.tile_color.get_color(this->data.type);
+ this->behavior = canvas.tile_behavior.create(this->data.type);
}
void Tile::update() {