Hymn to Beauty
C++ 3D Engine
TriggerManager Class Reference

Trigger management. More...

#include <TriggerManager.hpp>

Public Member Functions

void ProcessTriggers ()
 
Component::TriggerCreateTrigger ()
 Create a trigger component. More...
 
void AddTriggerRepeat (Component::Trigger *trigger, std::shared_ptr< Physics::Shape > shape)
 Add a repeating trigger to the component. More...
 
TriggerRepeatGetTriggerRepeat (const Component::Trigger &trigger) const
 Get the repeat trigger of a trigger component. More...
 
const std::vector< Component::Trigger * > & GetTriggerComponents () const
 Get all trigger components. More...
 
void SynchronizeTriggers ()
 Update the trigger volume data. More...
 
void InitiateUID ()
 Find and set entity with Unique ID. More...
 
void InitiateVolumes ()
 Set trigger volumes. More...
 
void ClearKilledComponents ()
 Remove all killed components. More...
 

Friends

class Hub
 

Detailed Description

Trigger management.

Member Function Documentation

◆ AddTriggerRepeat()

void TriggerManager::AddTriggerRepeat ( Component::Trigger trigger,
std::shared_ptr< Physics::Shape shape 
)

Add a repeating trigger to the component.

Parameters
triggerComponent to add trigger to.
shapeThe physical shape of the trigger volume.

◆ ClearKilledComponents()

void TriggerManager::ClearKilledComponents ( )

Remove all killed components.

◆ CreateTrigger()

Component::Trigger * TriggerManager::CreateTrigger ( )

Create a trigger component.

Returns
The created component.

◆ GetTriggerComponents()

const std::vector< Component::Trigger * > & TriggerManager::GetTriggerComponents ( ) const

Get all trigger components.

Returns
All trigger components.

◆ GetTriggerRepeat()

TriggerRepeat * TriggerManager::GetTriggerRepeat ( const Component::Trigger trigger) const

Get the repeat trigger of a trigger component.

Parameters
triggerComponent to access.
Returns
The repeat trigger if present, or nullptr if something else.

◆ InitiateUID()

void TriggerManager::InitiateUID ( )

Find and set entity with Unique ID.

◆ InitiateVolumes()

void TriggerManager::InitiateVolumes ( )

Set trigger volumes.

◆ ProcessTriggers()

void TriggerManager::ProcessTriggers ( )

Iterate triggers and have them call their target scripts if conditions are satisfied. This should be called after both the physics- and script managers have been updated.

◆ SynchronizeTriggers()

void TriggerManager::SynchronizeTriggers ( )

Update the trigger volume data.

Friends And Related Function Documentation

◆ Hub

friend class Hub
friend

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