mirror of
https://github.com/Show-maket/Tween.git
synced 2025-05-03 23:00: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;
|
||||
bool isPlayingF;
|
||||
|
||||
void dtTick() {
|
||||
uint32_t loopStartTime = millis();
|
||||
dt = (loopStartTime - oldMillis) / 1000.0;
|
||||
oldMillis = loopStartTime;
|
||||
}
|
||||
|
||||
public:
|
||||
void update() {
|
||||
if (!isPlayingF || easing == nullptr) return;
|
||||
@ -63,11 +69,7 @@ public:
|
||||
}
|
||||
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) {
|
||||
if (from == to) { return; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user