Refactored the animation so I can normalize it to one api. Next is to create the concept of a temporary entity that represents a transitive effect.
This commit is contained in:
parent
0afaa20c1d
commit
8384b11993
10 changed files with 123 additions and 23 deletions
|
|
@ -2,6 +2,9 @@
|
|||
#include "components.hpp"
|
||||
#include "textures.hpp"
|
||||
#include "easings.hpp"
|
||||
#include "dinkyecs.hpp"
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
|
||||
|
||||
namespace animation {
|
||||
struct AnimationManager {
|
||||
|
|
@ -13,5 +16,9 @@ namespace animation {
|
|||
void center(sf::Sprite& target, sf::Vector2f pos);
|
||||
|
||||
void init();
|
||||
components::Animation load(std::string name);
|
||||
components::Animation load(const std::string& name);
|
||||
bool has(const std::string& name);
|
||||
void configure(DinkyECS::World& world, DinkyECS::Entity entity);
|
||||
void step_animation(DinkyECS::World& world, DinkyECS::Entity entity, sf::Vector2f& scale_out, sf::Vector2f& pos_out, sf::IntRect& rect_out);
|
||||
void animate_entity(DinkyECS::World &world, DinkyECS::Entity entity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue