Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::TestComponent Class Reference

#include <TestComponent.h>

Inheritance diagram for EngineCore::TestComponent:
Collaboration diagram for EngineCore::TestComponent:

Public Member Functions

 TestComponent (Scene *scene, int id)
 ~TestComponent () override
void beginPlay () override
 Called when the component is added to the scene or the game starts.
void tick (double deltaTime) override
 Called every frame if ticking is enabled.
void endPlay () override
 Called when the component is removed or the game ends.
int getId () const
Public Member Functions inherited from EngineCore::LogicComponent
 LogicComponent (Scene *owningScene)
virtual ~LogicComponent ()=default
bool canTick () const
 Checks if the component is currently set to tick.
void setCanTick (bool enable)
 Enables or disables ticking for this component.
EntitygetOwningEntity () const
 Gets the entity this component belongs to.

Static Public Attributes

static constexpr bool IsUnique = false
Static Public Attributes inherited from EngineCore::LogicComponent
static constexpr bool IsUnique = false
 Defines whether multiple instances of this component can exist on the same entity. Defaults to false (multiple allowed). Override in derived classes with static constexpr bool IsUnique = true; if needed.

Private Attributes

int id

Additional Inherited Members

Protected Member Functions inherited from EngineCore::LogicComponent
ScenegetScene () const
 Gets the scene this component belongs to.
SceneManagergetSceneManager () const
 Helper to get the SceneManager from the owning scene.

Detailed Description

Definition at line 7 of file TestComponent.h.

Constructor & Destructor Documentation

◆ TestComponent()

EngineCore::TestComponent::TestComponent ( Scene * scene,
int id )
explicit

Definition at line 6 of file TestComponent.cpp.

References id, EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, and EngineCore::LogicComponent::setCanTick().

Here is the call graph for this function:

◆ ~TestComponent()

EngineCore::TestComponent::~TestComponent ( )
override

Definition at line 11 of file TestComponent.cpp.

Member Function Documentation

◆ beginPlay()

void EngineCore::TestComponent::beginPlay ( )
overridevirtual

Called when the component is added to the scene or the game starts.

Reimplemented from EngineCore::LogicComponent.

Definition at line 15 of file TestComponent.cpp.

◆ endPlay()

void EngineCore::TestComponent::endPlay ( )
overridevirtual

Called when the component is removed or the game ends.

Reimplemented from EngineCore::LogicComponent.

Definition at line 23 of file TestComponent.cpp.

◆ getId()

int EngineCore::TestComponent::getId ( ) const
inline

Definition at line 18 of file TestComponent.h.

References id.

◆ tick()

void EngineCore::TestComponent::tick ( double deltaTime)
overridevirtual

Called every frame if ticking is enabled.

Parameters
deltaTimeTime elapsed since last frame.

Reimplemented from EngineCore::LogicComponent.

Definition at line 19 of file TestComponent.cpp.

Member Data Documentation

◆ id

int EngineCore::TestComponent::id
private

Definition at line 21 of file TestComponent.h.

Referenced by getId(), and TestComponent().

◆ IsUnique

bool EngineCore::TestComponent::IsUnique = false
staticconstexpr

Definition at line 9 of file TestComponent.h.


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Component/TestComponent.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Component/TestComponent.cpp