|
|
|
@ -111,8 +111,8 @@ bool ExitCell::onMovingTo(HeroPtr &hero, LevelPtr &level)
|
|
|
|
|
|
|
|
|
|
TeleportCell::TeleportCell(coordinate cell_row, coordinate cell_col, coordinate new_cell_row, coordinate new_cell_col, const sf::Color &color) :
|
|
|
|
|
Cell(cell_row, cell_col, color),
|
|
|
|
|
new_x(new_cell_row),
|
|
|
|
|
new_y(new_cell_col)
|
|
|
|
|
new_row(new_cell_row),
|
|
|
|
|
new_col(new_cell_col)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
TeleportCell::~TeleportCell()
|
|
|
|
@ -123,10 +123,16 @@ bool TeleportCell::onMovingTo(HeroPtr &hero, LevelPtr &level)
|
|
|
|
|
UNUSED(level);
|
|
|
|
|
|
|
|
|
|
// Hero jumps into teleport!
|
|
|
|
|
hero->setPosition(new_x, new_y);
|
|
|
|
|
hero->setPosition(new_row, new_col);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TeleportCell::setDestination(coordinate new_cell_row, coordinate new_cell_col)
|
|
|
|
|
{
|
|
|
|
|
new_row = new_cell_row;
|
|
|
|
|
new_col = new_cell_col;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
TriggerCell::TriggerCell(/*std::vector<CellPtr> &&cells_to_change,*/ coordinate cell_row, coordinate cell_col, const sf::Color &color) :
|
|
|
|
|