/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Data/Samples/RTS/CppSource/RTSPlugin/AI/AiUtilitySystem.h
39 строк
1 KB
Jan Krassnigg
C++ Project Generation now also builds stand-alone game exe (#1465)
30 дек 2024, 12:59
Не верифицирован
30 дек 2024, 12:59
d369e9b
Код
Авторство
О чём код?
#pragma once #include <RTSPlugin/RTSPluginDLL.h> class RtsAiUtility; class RtsAiUtilitySystem { public: RtsAiUtilitySystem(); ~RtsAiUtilitySystem(); void AddUtility(ezUniquePtr<RtsAiUtility>&& pUtility); void Reevaluate(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent, ezTime now, ezTime frequency); bool Execute(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent, ezTime now); private: ezTime m_LastUpdate; RtsAiUtility* m_pActiveUtility = nullptr; ezHybridArray<ezUniquePtr<RtsAiUtility>, 8> m_Utilities; }; class RtsAiUtility { public: RtsAiUtility(); virtual ~RtsAiUtility(); virtual void Activate(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent) = 0; virtual void Deactivate(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent) = 0; virtual void Execute(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent, ezTime now) = 0; virtual double ComputePriority(ezGameObject* pOwnerObject, ezComponent* pOwnerComponent) const = 0; }; class RtsUnitComponentUtility : public RtsAiUtility { public: };