mirror of
https://github.com/Show-maket/Tween.git
synced 2025-05-04 07:10:20 +00:00
hide dtTick
This commit is contained in:
parent
220ec0791d
commit
519ec1ace2
12
Tween.h
12
Tween.h
@ -50,6 +50,12 @@ private:
|
|||||||
float progress;
|
float progress;
|
||||||
bool isPlayingF;
|
bool isPlayingF;
|
||||||
|
|
||||||
|
void dtTick() {
|
||||||
|
uint32_t loopStartTime = millis();
|
||||||
|
dt = (loopStartTime - oldMillis) / 1000.0;
|
||||||
|
oldMillis = loopStartTime;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void update() {
|
void update() {
|
||||||
if (!isPlayingF || easing == nullptr) return;
|
if (!isPlayingF || easing == nullptr) return;
|
||||||
@ -63,11 +69,7 @@ public:
|
|||||||
}
|
}
|
||||||
float current;
|
float current;
|
||||||
|
|
||||||
void dtTick() {
|
|
||||||
uint32_t loopStartTime = millis();
|
|
||||||
dt = (loopStartTime - oldMillis) / 1000.0;
|
|
||||||
oldMillis = loopStartTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
void start(float from, float to, uint16_t duration, eFunc easing) {
|
void start(float from, float to, uint16_t duration, eFunc easing) {
|
||||||
if (from == to) { return; }
|
if (from == to) { return; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user