|
|
|
@ -8,8 +8,9 @@
|
|
|
|
|
class Hero;
|
|
|
|
|
class Level;
|
|
|
|
|
|
|
|
|
|
using HeroPtr = std::unique_ptr<Hero>;
|
|
|
|
|
using LevelPtr = std::unique_ptr<Level>;
|
|
|
|
|
using HeroPtr = std::unique_ptr<Hero>;
|
|
|
|
|
using LevelPtr = std::unique_ptr<Level>;
|
|
|
|
|
using CellPtr = std::unique_ptr<Cell>;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////
|
|
|
|
|
|
|
|
|
@ -131,4 +132,24 @@ public:
|
|
|
|
|
virtual bool onMovingTo(HeroPtr &hero, LevelPtr &level) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
/// A cell which replaces and changes other map cells when activated
|
|
|
|
|
class TriggerCell : public Cell
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
// Vector of cells to place on map
|
|
|
|
|
std::vector<CellPtr> cells;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
TriggerCell(coordinate cell_x = 0,
|
|
|
|
|
coordinate cell_y = 0,
|
|
|
|
|
const std::vector<CellPtr> &cells_to_change = std::vector<CellPtr>(), // Pink
|
|
|
|
|
const sf::Color &color = sf::Color(255, 192, 203));
|
|
|
|
|
|
|
|
|
|
virtual ~TriggerCell() override;
|
|
|
|
|
|
|
|
|
|
virtual bool onMovingTo(HeroPtr &hero, LevelPtr &level) override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // CELL_H
|
|
|
|
|