diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 16:09:47 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 16:09:47 +0200 |
commit | 277157b3e06b2deeacbdbc8bf6190de19f88169d (patch) | |
tree | db9c013b67f93d27fa5bb9cf84c7d6dc53f72734 /Tile.cpp | |
parent | 64028952ceb17f97ded08f1ab7ec0b06c41e2b87 (diff) |
more refactoring / preparation for pathfinding
Diffstat (limited to 'Tile.cpp')
-rw-r--r-- | Tile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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() { |