17 #include <ht_component.h> 18 #include <ht_tween_value.h> 29 enum class TweenPlayMode : uint8_t
39 enum class TweenMethod : uint8_t
103 typedef float(*TweenFunction)(
float start,
float end,
float time,
float duration);
115 virtual Core::JSON VSerialize(
void)
override;
116 virtual bool VDeserialize(
const Core::JSON& jsonObject)
override;
121 float GetDuration()
const;
126 TweenMethod GetMethod()
const;
131 TweenPlayMode GetPlayMode()
const;
136 bool IsPlaying()
const;
151 bool Play(
float duration);
160 bool Play(
float duration, TweenMethod method);
170 bool Play(
float duration, TweenMethod method, TweenPlayMode mode);
177 void SetDuration(
float duration);
184 void SetMethod(TweenMethod method);
191 void SetPlayMode(TweenPlayMode mode);
201 void VOnInit()
override;
208 virtual void VOnUpdate()
override;
216 void VOnDestroy()
override;
223 virtual Core::Guid VGetComponentId(
void)
const override;
225 static std::vector<TweenFunction> s_tweenFunctions;
230 TweenFunction m_tweenFunction;
231 TweenMethod m_tweenMethod;
232 TweenPlayMode m_tweenPlayMode;
240 static void CreateTweenFunctions();
245 bool AreValuesCompatible()
const;
252 void VOnEnabled()
override;
260 void VOnDisabled()
override;
275 void OnStop(
bool interrupted);
Definition: ht_component.h:42
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
Defines the base for tween-based components.
Definition: ht_tween_component.h:91
Defines a tween value.
Definition: ht_tween_value.h:38