#include <rotatecomponent.h>
Public Member Functions | |
RotateComponentInstance (EntityInstance &entity, Component &resource) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual void | update (double deltaTime) override |
void | reset () |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
RotateProperties | mProperties |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Instance part of the rotate component. Automatically rotates the entity along a certain axis at a certain speed. The initial rotation value after initialization is used to rotate along the specified axis. This component updates (overrides) the rotate value of the transform component. Entities that use this component must have a transform.
RotateComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
|
overridevirtual |
Initialize this rotate component, copies it's members over and validates if a transform component is available that can be rotated.
errorState | contains the error if initialization fails. |
Reimplemented from ComponentInstance.
void reset | ( | ) |
Resets rotation to be 0
|
overridevirtual |
Rotates the component every tick based on the speed and exis
deltaTime | time it took to complete last cook (seconds) |
Reimplemented from ComponentInstance.
RotateProperties mProperties |