-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTweenModule.h
More file actions
69 lines (64 loc) · 1.82 KB
/
Copy pathTweenModule.h
File metadata and controls
69 lines (64 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
/**
* @file TweenModule.h
* @brief Central header for the Deki Tween Module
*
* The tween module provides value interpolation with easing functions.
*
* Usage:
*
* 1. Static API (requires at least one TweenComponent in prefab):
* @code
* #include "TweenModule.h"
*
* // Tween a float value
* deki::TweenManager::To(&myValue, 100.0f, 0.5f)
* .SetEase(deki::EaseType::QuadOut)
* .OnComplete([]() { });
*
* // Tween a DekiVector2
* deki::TweenManager::To(&position, DekiVector2(100, 200), 1.0f)
* .SetEase(deki::EaseType::SineInOut);
*
* // Delayed callback
* deki::TweenManager::DelayedCall(2.0f, []() { });
* @endcode
*
* 2. TweenComponent (editor-configurable):
* Add TweenComponent to a DekiObject in the editor and configure
* target type, start/end values, duration, easing, etc.
*
* Available easing types:
* - Linear
* - Sine: SineIn, SineOut, SineInOut
* - Quad: QuadIn, QuadOut, QuadInOut
* - Cubic: CubicIn, CubicOut, CubicInOut
* - Quart: QuartIn, QuartOut, QuartInOut
* - Quint: QuintIn, QuintOut, QuintInOut
* - Expo: ExpoIn, ExpoOut, ExpoInOut
* - Circ: CircIn, CircOut, CircInOut
* - Back: BackIn, BackOut, BackInOut
* - Elastic: ElasticIn, ElasticOut, ElasticInOut
* - Bounce: BounceIn, BounceOut, BounceInOut
*/
// DLL export macro
#ifdef DEKI_EDITOR
#ifdef _WIN32
#ifdef DEKI_TWEEN_EXPORTS
#define DEKI_TWEEN_API __declspec(dllexport)
#else
#define DEKI_TWEEN_API __declspec(dllimport)
#endif
#else
#define DEKI_TWEEN_API
#endif
#else
#define DEKI_TWEEN_API
#endif
// Include all module headers when module is enabled
#ifdef DEKI_MODULE_TWEEN
#include "Easing.h"
#include "Tween.h"
#include "TweenManager.h"
#include "TweenComponent.h"
#endif // DEKI_MODULE_TWEEN