Very early prototype of the ritual crafting UI, but it needs its own thing.

This commit is contained in:
Zed A. Shaw 2025-03-19 00:14:43 -04:00
parent a6d83db20c
commit f1cc9f86c1
6 changed files with 109 additions and 7 deletions

View file

@ -32,6 +32,7 @@ namespace components {
void Animation::play() {
if(!playing) {
current = 0;
subframe = 0.0f;
playing = true;
}
}
@ -71,6 +72,14 @@ namespace components {
subframe += speed;
current = int(subframe);
} else if(!looped) {
playing = false;
current = frames - 1;
subframe = float(frames - 1);
if(!simple) {
rect_out.position.x += current * texture_width;
}
} else {
playing = false;
current = 0;