Plasma Engine  2.0
Loading...
Searching...
No Matches
AiSensorManager.h
1#pragma once
2
3#include <AiPlugin/AiPluginDLL.h>
4#include <Foundation/Containers/HybridArray.h>
5#include <Foundation/Strings/String.h>
6#include <Foundation/Types/UniquePtr.h>
7#include <AiPlugin/UtilityAI/Framework/AiSensor.h>
8
9class PL_AIPLUGIN_DLL plAiSensorManager
10{
11 PL_DISALLOW_COPY_AND_ASSIGN(plAiSensorManager);
12
13public:
16
17 void AddSensor(plStringView sName, plUniquePtr<plAiSensor>&& pSensor);
18
19 void FlagAsNeeded(plStringView sName);
20
21 void UpdateNeededSensors(plGameObject& owner);
22
23 const plAiSensor* GetSensor(plStringView sName) const;
24
25private:
26 struct SensorInfo
27 {
28 plString m_sName;
30 bool m_bActive = true;
31 plUInt32 m_uiNeededInUpdate = 0;
32 };
33
34 plUInt32 m_uiUpdateCount = 1;
36};
Definition AiSensor.h:9
Definition AiSensorManager.h:10
This class represents an object inside the world.
Definition GameObject.h:32
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10