HatchitGame
Public Member Functions | Protected Member Functions | List of all members
Hatchit::Game::LightComponent Class Reference
Inheritance diagram for Hatchit::Game::LightComponent:
Hatchit::Game::Component

Public Member Functions

virtual Core::JSON VSerialize (void) override
 Saves light as JSON.
 
virtual bool VDeserialize (const Core::JSON &jsonObject) override
 Constructs light from JSON.
 
void SetType (LightType lightType)
 Sets the light to the specified type with proper data. More...
 
void VOnInit () override
 Called when the GameObject is created to initialize all values.
 
void VOnUpdate () override
 Called once per frame while the GameObject is enabled. More...
 
ComponentVClone () 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::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...
 

Protected Member Functions

void VOnEnabled () override
 Called when the Component is enabled. More...
 
void VOnDisabled () override
 Called when the Component is disabled. More...
 
void VOnDestroy () override
 Called when the GameObject is destroyed/deleted. More...
 

Additional Inherited Members

- 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 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...
 

Member Function Documentation

void Hatchit::Game::LightComponent::SetType ( LightType  lightType)

Sets the light to the specified type with proper data.

Parameters
lightTypeenum value of light
Core::Guid Hatchit::Game::LightComponent::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()

Implements Hatchit::Game::Component.

void Hatchit::Game::LightComponent::VOnDestroy ( void  )
overrideprotectedvirtual

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.

Implements Hatchit::Game::Component.

void Hatchit::Game::LightComponent::VOnDisabled ( void  )
overrideprotectedvirtual

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.

Implements Hatchit::Game::Component.

void Hatchit::Game::LightComponent::VOnEnabled ( void  )
overrideprotectedvirtual

Called when the Component is enabled.

This happens when a scene has finished loading, or immediately after creation if the scene is already loaded.

Implements Hatchit::Game::Component.

void Hatchit::Game::LightComponent::VOnUpdate ( void  )
overridevirtual

Called once per frame while the GameObject is enabled.

Updates all components first, then all child gameobjects.

Implements Hatchit::Game::Component.


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