mirror of https://github.com/procxx/kepka.git
Provide animation duration.
This commit is contained in:
parent
2f02198ac7
commit
d1518da1ad
|
@ -107,6 +107,10 @@ int Animation::frameRate() const {
|
||||||
return _frameRate;
|
return _frameRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crl::time Animation::duration() const {
|
||||||
|
return (_endFrame - _startFrame) * crl::time(1000) / _frameRate;
|
||||||
|
}
|
||||||
|
|
||||||
void Animation::play(const PlaybackOptions &options) {
|
void Animation::play(const PlaybackOptions &options) {
|
||||||
_options = options;
|
_options = options;
|
||||||
_started = crl::now();
|
_started = crl::now();
|
||||||
|
|
Loading…
Reference in New Issue