Refine how the raycaster.cpp uses animations so there's less back-and-forth on the intrect.
This commit is contained in:
parent
cded8a937e
commit
594be65f45
3 changed files with 18 additions and 5 deletions
|
|
@ -117,6 +117,7 @@ namespace animation {
|
|||
std::string form_name="idle";
|
||||
std::string sequence_name="";
|
||||
std::string transform_name="";
|
||||
std::string name="";
|
||||
|
||||
std::vector<sf::IntRect> calc_frames();
|
||||
void play();
|
||||
|
|
@ -125,6 +126,7 @@ namespace animation {
|
|||
bool has_form(const std::string& as_form);
|
||||
void set_form(const std::string& form);
|
||||
void apply(sf::Sprite& sprite);
|
||||
void apply(sf::Sprite& sprite, sf::IntRect& rect_io);
|
||||
void apply_effect(std::shared_ptr<sf::Shader> effect);
|
||||
void update();
|
||||
void motion(sf::Transformable& sprite, sf::Vector2f pos, sf::Vector2f scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue