Now I can attach arbitrary shaders to sprites based on things that happen in the world.
This commit is contained in:
parent
bec8fe0a13
commit
787be78a69
6 changed files with 53 additions and 16 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "dinkyecs.hpp"
|
||||
#include "point.hpp"
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
#include <SFML/Graphics/Shader.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
|
@ -15,6 +16,11 @@
|
|||
namespace components {
|
||||
using namespace nlohmann;
|
||||
|
||||
struct SpriteEffect {
|
||||
int frames;
|
||||
std::shared_ptr<sf::Shader> effect;
|
||||
};
|
||||
|
||||
struct Position {
|
||||
Point location;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue