Agrarsense
|
#include <SensorManager.h>
Public Member Functions | |
virtual void | Initialize (FSubsystemCollectionBase &Collection) override |
virtual void | Deinitialize () override |
TArray< ASensor * > | GetAllSensors () const |
TArray< ASensor * > | GetAllSensorsOfType (ESensorTypes SensorType) const |
Static Public Member Functions | |
static USensorManager * | Get () |
Public Attributes | |
FSensorSpawnedDelegate | OnSensorSpawned |
FSensorDestroyedDelegate | OnSensorDestroyed |
Static Private Member Functions | |
static void | AddSensor (ASensor *SensorPtr) |
static void | RemoveSensor (ASensor *SensorPtr) |
Private Attributes | |
TArray< ASensor * > | Sensors |
Static Private Attributes | |
static USensorManager * | SensorManagerPtr = nullptr |
Friends | |
class | ASensor |
Sensor Manager. Implemented as a GameInstanceSubsystem, ensuring it remains active throughout the application's lifetime. This subsystem is initialized once at the start of the simulation and persists across map changes, only being destroyed when the application exits.
Definition at line 27 of file SensorManager.h.
|
staticprivate |
Definition at line 58 of file SensorManager.cpp.
References Get(), OnSensorSpawned, and Sensors.
Referenced by ASensor::BeginPlay().
|
overridevirtual |
Definition at line 24 of file SensorManager.cpp.
References SensorManagerPtr, and Sensors.
|
static |
Definition at line 36 of file SensorManager.cpp.
References SensorManagerPtr.
Referenced by AddSensor(), UAgrarsenseStatics::GetSensorManager(), RemoveSensor(), and UAgrarsenseSettings::Setup().
TArray< ASensor * > USensorManager::GetAllSensors | ( | ) | const |
Retrieves all sensors currently managed by this Sensor Manager.
Definition at line 78 of file SensorManager.cpp.
References Sensors.
TArray< ASensor * > USensorManager::GetAllSensorsOfType | ( | ESensorTypes | SensorType | ) | const |
Retrieves sensors of a specific type currently managed by this Sensor Manager.
SensorType | The type of sensors to retrieve. |
Definition at line 83 of file SensorManager.cpp.
References Sensors.
|
overridevirtual |
Definition at line 15 of file SensorManager.cpp.
|
staticprivate |
Definition at line 68 of file SensorManager.cpp.
References Get(), OnSensorDestroyed, and Sensors.
Referenced by ASensor::EndPlay().
|
friend |
Definition at line 72 of file SensorManager.h.
FSensorDestroyedDelegate USensorManager::OnSensorDestroyed |
On Sensor Destroyed event. Called right before starting to destroy things at Sensor::EndPlay.
Definition at line 68 of file SensorManager.h.
Referenced by RemoveSensor(), and UAgrarsenseSettings::Setup().
FSensorSpawnedDelegate USensorManager::OnSensorSpawned |
On Sensor spawned event. Called last in Sensor::BeginPlay
Definition at line 61 of file SensorManager.h.
Referenced by AddSensor(), and UAgrarsenseSettings::Setup().
|
staticprivate |
Definition at line 78 of file SensorManager.h.
Referenced by Deinitialize(), and Get().
|
private |
Definition at line 81 of file SensorManager.h.
Referenced by AddSensor(), Deinitialize(), GetAllSensors(), GetAllSensorsOfType(), and RemoveSensor().