| 262 | } |
| 263 | |
| 264 | void Trap::deactivate(Tile* tile) |
| 265 | { |
| 266 | if (tile == nullptr) |
| 267 | return; |
| 268 | |
| 269 | TrapTileData* trapTileData = static_cast<TrapTileData*>(mTileData[tile]); |
| 270 | trapTileData->setActivated(false); |
| 271 | |
| 272 | BuildingObject* entity = getBuildingObjectFromTile(tile); |
| 273 | if (entity == nullptr) |
| 274 | return; |
| 275 | |
| 276 | entity->setMeshOpacity(0.5f); |
| 277 | } |
| 278 | |
| 279 | bool Trap::isActivated(Tile* tile) const |
| 280 | { |
nothing calls this directly
no test coverage detected