Now the Animation system is no more. Next is cleaning up the quick hacks I needed to finally get rid of it, like animate2::has.
This commit is contained in:
parent
b504afef2a
commit
89ca204f3d
15 changed files with 356 additions and 423 deletions
|
|
@ -1,22 +0,0 @@
|
|||
#pragma once
|
||||
#include "components.hpp"
|
||||
#include "easings.hpp"
|
||||
#include "dinkyecs.hpp"
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
|
||||
namespace animation {
|
||||
struct AnimationManager {
|
||||
std::unordered_map<std::string, components::Animation> animations;
|
||||
};
|
||||
|
||||
void rotate(sf::Sprite& target, float degrees);
|
||||
void center(sf::Sprite& target, sf::Vector2f pos);
|
||||
|
||||
void init();
|
||||
components::Animation load(const std::string& name, const std::string& state="");
|
||||
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