|
HatchitGame
|
Public Member Functions | |
| Component (const Component &rhs)=default | |
| Component (Component &&rhs)=default | |
| Component & | operator= (const Component &rhs)=default |
| Component & | operator= (Component &&rhs)=default |
| virtual Core::JSON | VSerialize (void)=0 |
| virtual bool | VDeserialize (const Core::JSON &jsonObject)=0 |
| GameObject * | GetOwner (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... | |
| virtual void | VOnInit (void)=0 |
| Called when the GameObject is created to initialize all values. | |
| virtual void | VOnUpdate (void)=0 |
| Called once per frame while the GameObject is enabled. More... | |
| virtual void | VOnDestroy (void)=0 |
| Called when the GameObject is destroyed/deleted. More... | |
| virtual Component * | VClone (void) const =0 |
| Creates a copy of this Component. More... | |
| virtual Core::Guid | VGetComponentId (void) const =0 |
| void | SetOwner (GameObject *owner) |
| Setter that sets which GameObject this Component is attached to. More... | |
Static Public Member Functions | |
| template<typename T > | |
| static Core::Guid | GetComponentId (void) |
| Returns the unique id associated with a Component of type T. More... | |
Protected Member Functions | |
| virtual void | VOnEnabled (void)=0 |
| Called when the Component is enabled. More... | |
| virtual void | VOnDisabled (void)=0 |
| Called when the Component is disabled. More... | |
Protected Attributes | |
| bool | m_enabled {true} |
| bool indicating if this Component is enabled. More... | |
| GameObject * | m_owner |
| The GameObject to which this Component is attached. More... | |
|
static |
| bool Component::GetEnabled | ( | void | ) |
Getter that returns that value of m_enabled.
| GameObject * Component::GetOwner | ( | void | ) |
Getter which returns the GameObject to which this Component is attached.
| void Component::SetEnabled | ( | bool | value | ) |
Setter that sets the value of m_enabled.
| value | The new value of m_enabled. |
| void Component::SetOwner | ( | GameObject * | owner | ) |
Setter that sets which GameObject this Component is attached to.
| owner | The GameObject to which this Component is attached. |
|
pure virtual |
Creates a copy of this Component.
This is used by GameObject to create a copy of a class extending Component without knowledge of its underlying type.
Implemented in Hatchit::Game::TweenComponent, Hatchit::Game::TweenScale, Hatchit::Game::TweenPosition, Hatchit::Game::TweenRotation, Hatchit::Game::AudioSource, Hatchit::Game::Camera, Hatchit::Game::MeshRenderer, Hatchit::Game::LightComponent, Hatchit::Game::AudioListener, and Hatchit::Game::TestComponent.
|
pure virtual |
Called when the GameObject is destroyed/deleted.
Objects are always disabled before destroyed. When a scene is destroyed, all gameobjects are disabled before any are destroyed.
Implemented in Hatchit::Game::TweenComponent, Hatchit::Game::MeshRenderer, Hatchit::Game::AudioSource, Hatchit::Game::LightComponent, Hatchit::Game::Camera, Hatchit::Game::TestComponent, and Hatchit::Game::AudioListener.
|
protectedpure virtual |
Called when the Component is disabled.
Components are always disabled before destroyed. When a scene is destroyed, all Components are disabled before any are destroyed.
Implemented in Hatchit::Game::TweenComponent, Hatchit::Game::Camera, Hatchit::Game::MeshRenderer, Hatchit::Game::AudioSource, Hatchit::Game::LightComponent, Hatchit::Game::AudioListener, and Hatchit::Game::TestComponent.
|
protectedpure virtual |
Called when the Component is enabled.
This happens when a scene has finished loading, or immediately after creation if the scene is already loaded.
Implemented in Hatchit::Game::TweenComponent, Hatchit::Game::AudioSource, Hatchit::Game::Camera, Hatchit::Game::MeshRenderer, Hatchit::Game::LightComponent, Hatchit::Game::AudioListener, and Hatchit::Game::TestComponent.
|
pure virtual |
Called once per frame while the GameObject is enabled.
Updates all components first, then all child gameobjects.
Implemented in Hatchit::Game::TweenComponent, Hatchit::Game::TweenScale, Hatchit::Game::TweenPosition, Hatchit::Game::TweenRotation, Hatchit::Game::AudioSource, Hatchit::Game::LightComponent, Hatchit::Game::MeshRenderer, Hatchit::Game::Camera, Hatchit::Game::AudioListener, and Hatchit::Game::TestComponent.
|
protected |
bool indicating if this Component is enabled.
|
protected |
The GameObject to which this Component is attached.
1.8.11