Animations are refactored to let me spawn in an 'attack animation' but I think the data model is wrong. Rather than spawning in an animation every time I can probably just make one, reposition it, then tell it to play. I'll have to try it.

This commit is contained in:
Zed A. Shaw 2025-09-12 11:56:11 -04:00
parent 8384b11993
commit ad3e580495
15 changed files with 109 additions and 56 deletions

View file

@ -26,6 +26,10 @@ namespace components {
std::shared_ptr<sf::Shader> effect;
};
struct Temporary {
bool is = true;
};
struct Collision {
bool has = true;
};
@ -124,7 +128,8 @@ namespace components {
float subframe = 0.0f;
bool looped = false;
// BUG: this is weirdly not used in most animations but also named wrong should be frame_width
int frame_width = TEXTURE_WIDTH;
int frame_width = -1;
int frame_height = -1;
void play();
float twitching();