HatchitGame
Public Member Functions | List of all members
Hatchit::Game::TweenRotation Class Reference

Defines a tween component that can be used to tween an object's rotation. More...

#include <ht_tween_rotation.h>

Inheritance diagram for Hatchit::Game::TweenRotation:
Hatchit::Game::TweenComponent Hatchit::Game::Component

Public Member Functions

 TweenRotation ()
 Creates a new tween rotation component.
 
 ~TweenRotation ()
 Destroys this tween rotation component.
 
virtual Core::JSON VSerialize (void) override
 
virtual bool VDeserialize (const Core::JSON &jsonObject) override
 
Math::Float3 GetStartRotation () const
 Gets the start tween rotation.
 
Math::Float3 GetEndRotation () const
 Gets the end tween rotation.
 
void SetStartRotation (const Math::Float3 &value)
 Sets the start tween rotation. More...
 
void SetEndRotation (const Math::Float3 &value)
 Sets the end tween rotation. More...
 
void VOnUpdate () final override
 Called once per frame while the GameObject is enabled. More...
 
ComponentVClone (void) const override
 Creates a copy of this Component.
 
virtual Core::Guid VGetComponentId (void) const override
 Retrieves the id associated with this class of Component. More...
 
- Public Member Functions inherited from Hatchit::Game::TweenComponent
 TweenComponent ()
 Creates a new tween component.
 
virtual ~TweenComponent ()
 Destroys this tween component.
 
float GetDuration () const
 Gets the duration of the tween.
 
TweenMethod GetMethod () const
 Gets the tween method.
 
TweenPlayMode GetPlayMode () const
 Gets the tween play mode.
 
bool IsPlaying () const
 Checks to see if this tween is playing.
 
bool Play ()
 Plays the tween. More...
 
bool Play (float duration)
 Plays the tween. More...
 
bool Play (float duration, TweenMethod method)
 Plays the tween. More...
 
bool Play (float duration, TweenMethod method, TweenPlayMode mode)
 Plays the tween. More...
 
void SetDuration (float duration)
 Sets the tween's duration. More...
 
void SetMethod (TweenMethod method)
 Sets the tween method. More...
 
void SetPlayMode (TweenPlayMode mode)
 Sets the play mode. More...
 
void Stop ()
 Stops the tween.
 
void VOnInit () override
 Called when the GameObject is created to initialize all values.
 
void VOnDestroy () override
 Called when the GameObject is destroyed/deleted. More...
 
- Public Member Functions inherited from Hatchit::Game::Component
 Component (const Component &rhs)=default
 
 Component (Component &&rhs)=default
 
Componentoperator= (const Component &rhs)=default
 
Componentoperator= (Component &&rhs)=default
 
GameObjectGetOwner (void)
 Getter which returns the GameObject to which this Component is attached. More...
 
bool GetEnabled (void)
 Getter that returns that value of m_enabled. More...
 
void SetEnabled (bool value)
 Setter that sets the value of m_enabled. More...
 
void SetOwner (GameObject *owner)
 Setter that sets which GameObject this Component is attached to. More...
 

Additional Inherited Members

- Public Types inherited from Hatchit::Game::TweenComponent
typedef float(* TweenFunction) (float start, float end, float time, float duration)
 The type for tween function pointers. More...
 
- Static Public Member Functions inherited from Hatchit::Game::Component
template<typename T >
static Core::Guid GetComponentId (void)
 Returns the unique id associated with a Component of type T. More...
 
- Protected Member Functions inherited from Hatchit::Game::TweenComponent
bool AreValuesCompatible () const
 Checks to see if the start and end values are compatible.
 
void VOnEnabled () override
 Called when the Component is enabled. More...
 
void VOnDisabled () override
 Called when the Component is disabled. More...
 
- Static Protected Member Functions inherited from Hatchit::Game::TweenComponent
static void CreateTweenFunctions ()
 Creates the global list of tween functions.
 
- Protected Attributes inherited from Hatchit::Game::TweenComponent
TweenValue m_targetValue
 
TweenValue m_startValue
 
TweenValue m_endValue
 
TweenFunction m_tweenFunction
 
TweenMethod m_tweenMethod
 
TweenPlayMode m_tweenPlayMode
 
float m_startTime
 
float m_duration
 
bool m_isPlaying
 
- Protected Attributes inherited from Hatchit::Game::Component
bool m_enabled {true}
 bool indicating if this Component is enabled. More...
 
GameObjectm_owner
 The GameObject to which this Component is attached. More...
 
- Static Protected Attributes inherited from Hatchit::Game::TweenComponent
static std::vector< TweenFunctions_tweenFunctions
 

Detailed Description

Defines a tween component that can be used to tween an object's rotation.

Member Function Documentation

void Hatchit::Game::TweenRotation::SetEndRotation ( const Math::Float3 &  value)

Sets the end tween rotation.

Parameters
valueThe new end rotation.
void Hatchit::Game::TweenRotation::SetStartRotation ( const Math::Float3 &  value)

Sets the start tween rotation.

Parameters
valueThe new start rotation.
Core::Guid Hatchit::Game::TweenRotation::VGetComponentId ( void  ) const
overridevirtual

Retrieves the id associated with this class of Component.

Returns
The Core::Guid associated with this Component type.
See also
Component(), GameObject()

Reimplemented from Hatchit::Game::TweenComponent.

void Hatchit::Game::TweenRotation::VOnUpdate ( void  )
finaloverridevirtual

Called once per frame while the GameObject is enabled.

Updates all components first, then all child gameobjects.

Reimplemented from Hatchit::Game::TweenComponent.


The documentation for this class was generated from the following files: