Files
Nuake-custom/Nuake/src/Scene/Components/TriggerZone.h
Antoine Pilote 0c6ed48bbd Major cleanup.
Moved to namespace
Cleanup includes
2021-07-11 18:56:44 -04:00

39 lines
628 B
C++

#pragma once
#include "src/Core/Physics/GhostObject.h"
#include <vector>
namespace Nuake {
class TriggerZone {
public:
Ref<GhostObject> GhostObject;
std::string target = "";
std::vector<Entity> Targets;
bool Enabled = true;
TriggerZone()
{
Targets = std::vector<Entity>();
}
int GetOverLappingCount()
{
if (!Enabled) return 0;
return GhostObject->OverlappingCount();
}
std::vector<Entity> GetTargets() {
return Targets;
}
std::vector<Entity> GetOverlappingBodies()
{
if (!Enabled)
return std::vector<Entity>();
return GhostObject->GetOverlappingEntities();
}
};
}