|
StevEngine
StevEngine is a customizable C++ game engine.
|
Base class for all game object components. More...
#include <main/Component.hpp>
Public Member Functions | |
| Component () | |
| Create new component. | |
| virtual | ~Component () |
| Clean up component resources. | |
| GameObject & | GetParent () const |
| Get parent GameObject. | |
| Scene & | GetScene () const |
| Get containing Scene. | |
| virtual std::string | GetType () const =0 |
| Get component type. | |
| virtual Utilities::Stream | Export (Utilities::StreamType stream) const |
| Serialize component to a stream. | |
| virtual void | Start () |
| Initialize component after creation. | |
| virtual void | Deactivate () |
| Clean up when component is deactivated. | |
| virtual void | Update (double deltaTime) |
| Update component logic. | |
| virtual void | Draw (const Utilities::Matrix4 &transform) |
| Draw component visuals. | |
Protected Attributes | |
| std::vector< std::pair< Utilities::ID, std::string > > | handlers |
| Event handler registrations. | |
Friends | |
| class | StevEngine::GameObject |
Base class for all game object components.
Components provide behavior and functionality to GameObjects. They can respond to events, be serialized, and manage resources.
|
inlinevirtual |
Clean up when component is deactivated.
Reimplemented in StevEngine::Physics::CharacterBody, and StevEngine::Physics::RigidBody.
|
inlinevirtual |
Draw component visuals.
| transform | World transform matrix |
Reimplemented in StevEngine::Visuals::ModelRenderer.
|
virtual |
Serialize component to a stream.
| type | Type of stream to export to |
Reimplemented in StevEngine::Audio::Emitter, StevEngine::Physics::CharacterBody, StevEngine::Physics::Collider, StevEngine::Physics::RigidBody, StevEngine::Renderer::RenderComponent, StevEngine::Visuals::Camera, StevEngine::Visuals::CapsulePrimitive, StevEngine::Visuals::CubePrimitive, StevEngine::Visuals::CylinderPrimitive, StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::IcospherePrimitive, StevEngine::Visuals::ModelRenderer, StevEngine::Visuals::PointLight, StevEngine::Visuals::SpotLight, StevEngine::Visuals::TerrainRenderer, and StevEngine::Visuals::UVSpherePrimitive.
| GameObject & StevEngine::Component::GetParent | ( | ) | const |
Get parent GameObject.
| Scene & StevEngine::Component::GetScene | ( | ) | const |
|
pure virtual |
Get component type.
Implemented in StevEngine::Audio::Emitter, StevEngine::Physics::CharacterBody, StevEngine::Physics::Collider, StevEngine::Physics::RigidBody, StevEngine::Renderer::RenderComponent, StevEngine::Visuals::Camera, StevEngine::Visuals::CapsulePrimitive, StevEngine::Visuals::CubePrimitive, StevEngine::Visuals::CylinderPrimitive, StevEngine::Visuals::DirectionalLight, StevEngine::Visuals::IcospherePrimitive, StevEngine::Visuals::ModelRenderer, StevEngine::Visuals::PointLight, StevEngine::Visuals::SpotLight, StevEngine::Visuals::TerrainRenderer, and StevEngine::Visuals::UVSpherePrimitive.
|
inlinevirtual |
Initialize component after creation.
Reimplemented in StevEngine::Physics::CharacterBody, and StevEngine::Physics::RigidBody.
|
inlinevirtual |
Update component logic.
| deltaTime | Time since last update |
Reimplemented in StevEngine::Physics::CharacterBody, and StevEngine::Physics::RigidBody.