feat(lighting): flicker tipus foc per antorxes
This commit is contained in:
1 parent
3195746189
commit
35aaa6c519
8 files changed
+124
-16
No files matched your search
@@ -1021,13 +1021,13 @@ void GameScene::applyLightingPass() {
|
||||
for (const auto& p : players_) {
|
||||
if (p->isOutOfPlay()) { continue; }
|
||||
const auto C = p->getLightCenter();
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = PLAYER_R});
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = PLAYER_R, .flicker = false});
|
||||
}
|
||||
for (const auto* e : entity_manager_.getEntities()) {
|
||||
const int R = e->getLightRadius();
|
||||
if (R <= 0) { continue; }
|
||||
const auto C = e->getLightCenter();
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = R});
|
||||
emitters.push_back({.cx = C.x, .cy = C.y, .radius = R, .flicker = e->getLightFlicker()});
|
||||
}
|
||||
Lighting::apply(Screen::get().getCanvasArgb(),
|
||||
Screen::get().getCanvasWidth(),
|
||||
|
||||
Reference in new issue
Block a user