|
| | Tween (float duration=1.f) |
| |
| | ~Tween () |
| |
| | Tween (const Tween &)=delete |
| |
| Tween & | operator= (const Tween &)=delete |
| |
| void | setFrom (const std::string &name, float value) |
| |
| void | setTo (const std::string &name, float value) |
| |
| void | setDelta (const std::string &name, float delta) |
| | Relative change: end = start + delta (resolved when start() runs).
|
| |
| void | setFromAngle (const std::string &name, float radians) |
| |
| void | setToAngle (const std::string &name, float radians) |
| |
| void | setDeltaAngle (const std::string &name, float deltaRadians) |
| |
| bool | has (const std::string &name) const |
| |
| float | get (const std::string &name) const |
| |
| float | getFrom (const std::string &name) const |
| |
| float | getTo (const std::string &name) const |
| |
| float | getDelta (const std::string &name) const |
| |
| void | setDuration (float seconds) |
| |
| float | getDuration () const |
| |
| void | setDelay (float seconds) |
| |
| float | getDelay () const |
| |
| void | setEase (const std::string &kind) |
| |
| std::string | getEase () const |
| |
| void | setRepeat (int count) |
| | Play count: 1 = once (default), N = N cycles, -1 = infinite. Values < -1 are clamped to -1.
|
| |
| int | getRepeat () const |
| |
| void | setYoyo (bool enabled) |
| |
| bool | getYoyo () const |
| |
| void | start () |
| |
| void | pause () |
| |
| void | resume () |
| |
| void | stop () |
| |
| void | reset () |
| |
| bool | isRunning () const |
| |
| bool | isPaused () const |
| |
| bool | isFinished () const |
| |
| bool | isStopped () const |
| |
| bool | isDelayed () const |
| |
| bool | isActive () const |
| |
| float | getElapsed () const |
| | Elapsed time in the current cycle (excludes delay).
|
| |
| float | getProgress () const |
| | Linear progress in the current cycle, [0,1].
|
| |
| float | getEasedProgress () const |
| | Eased progress used for interpolation, [0,1].
|
| |
| bool | update (float dt) |
| | Advance by dt seconds. Returns true while the tween is still active (delayed / running / paused).
|
| |
| float | evaluate (const std::string &name, float t) const |
| | Sample property at linear t in [0,1] using current from/to (no state change).
|
| |
| int | getPropertyCount () const |
| | Names of all property tracks (stable order = insertion order).
|
| |
| std::string | getPropertyName (int index) const |
| |
Property tween — interpolates named float properties from → to over time.
Absolute end: setFrom + setTo. Relative delta (“变动差值”): setFrom + setDelta (to = from + delta at start), or setDelta alone (from defaults to current/0). Angle tracks use shortest-path lerp (setToAngle / setDeltaAngle).
No API overloads; ease kind is a string (same set as Math.ease).
在文件 Tween.h 第 21 行定义.