| 160 | } |
| 161 | |
| 162 | void PlatformWorld::onCameraMoved(float deltaX, float deltaY) { |
| 163 | for (auto it : _layers) { |
| 164 | if (Layer* layer = it.second) { |
| 165 | Vec2 pos = { |
| 166 | deltaX * layer->ratio.x + layer->getX(), |
| 167 | deltaY * layer->ratio.y + layer->getY()}; |
| 168 | layer->setPosition(pos); |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void PlatformWorld::onCameraReset() { |
| 174 | for (auto it : _layers) { |
nothing calls this directly
no test coverage detected