--------------------------------------------- HAS POWER --------------------------------------------------
| 640 | }; |
| 641 | //--------------------------------------------- HAS POWER -------------------------------------------------- |
| 642 | bool Game::hasPower(int tileX, int tileY, UnitType unitType) const |
| 643 | { |
| 644 | if ( unitType.isValid() && unitType < UnitTypes::None ) |
| 645 | return hasPowerPrecise( tileX*32 + unitType.tileWidth()*16, tileY*32 + unitType.tileHeight()*16, unitType); |
| 646 | return hasPowerPrecise( tileX*32, tileY*32, UnitTypes::None); |
| 647 | } |
| 648 | bool Game::hasPower(TilePosition position, UnitType unitType) const |
| 649 | { |
| 650 | return hasPower(position.x, position.y, unitType); |