Components who defines the behaviour of a GameObject.
More...
#include <Component.hpp>
|
| | Component (GameObject *parent) |
| | Construct a new Component. The component will be automatically added to the GameObject given as parameter.
|
| virtual void | load () |
| | Called when the component is loaded into the scene.
|
| virtual void | on_disable () |
| | Called when the component is disabled.
|
| virtual void | on_enable () |
| | Called when the component is enabled (Not called on the first initialization).
|
| virtual void | update (int delta_time) |
| | Logic update. Souldn't be used for anything else than logic.
|
| virtual void | unload () |
| | Called when the component is unloaded.
|
| void | disable () |
| | Disable the component. Do nothing if already disabled.
|
| void | enable () |
| | Enable the component. Do nothing if already enabled.
|
| bool | is_enabled () |
| | Check if the component is enabled.
|
| const char * | get_name () const |
| | Display name of the component (used by the editor).
|
Components who defines the behaviour of a GameObject.
◆ Component()
| turbo::Component::Component |
( |
GameObject * | parent | ) |
|
|
explicit |
Construct a new Component. The component will be automatically added to the GameObject given as parameter.
- Parameters
-
◆ disable()
| void turbo::Component::disable |
( |
| ) |
|
Disable the component. Do nothing if already disabled.
◆ enable()
| void turbo::Component::enable |
( |
| ) |
|
Enable the component. Do nothing if already enabled.
◆ get_name()
| const char * turbo::Component::get_name |
( |
| ) |
const |
Display name of the component (used by the editor).
◆ is_enabled()
| bool turbo::Component::is_enabled |
( |
| ) |
|
Check if the component is enabled.
- Returns
- true if enabled
◆ load()
| virtual void turbo::Component::load |
( |
| ) |
|
|
inlinevirtual |
◆ on_disable()
| virtual void turbo::Component::on_disable |
( |
| ) |
|
|
inlinevirtual |
◆ on_enable()
| virtual void turbo::Component::on_enable |
( |
| ) |
|
|
inlinevirtual |
◆ unload()
| virtual void turbo::Component::unload |
( |
| ) |
|
|
inlinevirtual |
◆ update()
| virtual void turbo::Component::update |
( |
int | delta_time | ) |
|
|
inlinevirtual |
◆ debug_inspector_observers
Debug use only. List of observed values in the inspector.
◆ enabled
| bool turbo::Component::enabled = true |
|
protected |
◆ gameObject
| GameObject* turbo::Component::gameObject = nullptr |
|
protected |
◆ name
| const char* turbo::Component::name = "Unknown" |
|
protected |
The documentation for this class was generated from the following files: