Very early prototype of the ritual crafting UI, but it needs its own thing.
This commit is contained in:
parent
a6d83db20c
commit
f1cc9f86c1
6 changed files with 109 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue