| 1959 | } |
| 1960 | |
| 1961 | void Tile::setTileCullingFlags(uint32_t mask, bool value) |
| 1962 | { |
| 1963 | // We save the current state. If the result is different, we refresh culling |
| 1964 | mTileCulling = (value ? mTileCulling | mask : mTileCulling & ~mask); |
| 1965 | |
| 1966 | if(mTileCulling == CullingType::HIDE) |
| 1967 | { |
| 1968 | // We cull the tile |
| 1969 | setParentNodeDetachFlags(EntityParentNodeAttach::DETACH_CULLING, true); |
| 1970 | for(GameEntity* entity : mEntitiesInTile) |
| 1971 | entity->setParentNodeDetachFlags(EntityParentNodeAttach::DETACH_CULLING, true); |
| 1972 | } |
| 1973 | else |
| 1974 | { |
| 1975 | // Here, we want to show the tile |
| 1976 | setParentNodeDetachFlags(EntityParentNodeAttach::DETACH_CULLING, false); |
| 1977 | for(GameEntity* entity : mEntitiesInTile) |
| 1978 | entity->setParentNodeDetachFlags(EntityParentNodeAttach::DETACH_CULLING, false); |
| 1979 | } |
| 1980 | } |
| 1981 | |
| 1982 | bool Tile::addTileStateListener(TileStateListener& listener) |
| 1983 | { |
no test coverage detected