The flame shader now only turns on when facing an enemy. Next is tagging enemies with specific shaders to apply at a specific time.

This commit is contained in:
Zed A. Shaw 2025-04-16 00:02:27 -04:00
parent 5ffa3b0d1e
commit 1b4f55804c
6 changed files with 29 additions and 13 deletions

View file

@ -13,6 +13,7 @@ struct Raycaster {
int $pitch=0;
sf::Clock $clock;
std::shared_ptr<sf::Shader> $brightness = nullptr;
std::shared_ptr<sf::Shader> $flame = nullptr;
double $pos_x = 0;
double $pos_y = 0;
@ -62,4 +63,5 @@ struct Raycaster {
void update_level(GameLevel level);
void update_sprite(DinkyECS::Entity ent, components::Sprite& sprite);
void init_shaders();
void apply_sprite_effect(shared_ptr<sf::Shader> effect, float width, float height);
};