2023-02-10 08:29:53 +00:00
|
|
|
#ifndef __TRIGGERCOMPONENT__H__
|
|
|
|
#define __TRIGGERCOMPONENT__H__
|
|
|
|
|
|
|
|
#include "Component.h"
|
2023-03-25 10:26:39 +00:00
|
|
|
#include "LUTriggers.h"
|
2023-03-04 07:16:37 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2023-02-10 08:29:53 +00:00
|
|
|
|
|
|
|
class TriggerComponent : public Component {
|
|
|
|
public:
|
2023-03-04 07:16:37 +00:00
|
|
|
static const eReplicaComponentType ComponentType = eReplicaComponentType::TRIGGER;
|
2023-02-10 08:29:53 +00:00
|
|
|
|
|
|
|
explicit TriggerComponent(Entity* parent, const std::string triggerInfo);
|
|
|
|
|
|
|
|
void TriggerEvent(eTriggerEventType event, Entity* optionalTarget = nullptr);
|
|
|
|
LUTriggers::Trigger* GetTrigger() const { return m_Trigger; }
|
2023-03-25 10:26:39 +00:00
|
|
|
void SetTriggerEnabled(bool enabled){ m_Trigger->enabled = enabled; };
|
|
|
|
|
2023-02-10 08:29:53 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void HandleTriggerCommand(LUTriggers::Command* command, Entity* optionalTarget);
|
|
|
|
std::vector<Entity*> GatherTargets(LUTriggers::Command* command, Entity* optionalTarget);
|
|
|
|
|
|
|
|
// Trigger Event Handlers
|
|
|
|
void HandleFireEvent(Entity* targetEntity, std::string args);
|
2023-03-25 10:26:39 +00:00
|
|
|
void HandleDestroyObject(Entity* targetEntity, std::string args);
|
|
|
|
void HandleToggleTrigger(Entity* targetEntity, std::string args);
|
|
|
|
void HandleResetRebuild(Entity* targetEntity, std::string args);
|
2023-08-23 19:53:02 +00:00
|
|
|
void HandleSetPath(Entity* targetEntity, std::vector<std::string> argArray);
|
2023-03-25 10:26:39 +00:00
|
|
|
void HandleMoveObject(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleRotateObject(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandlePushObject(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleRepelObject(Entity* targetEntity, std::string args);
|
2023-04-18 17:48:03 +00:00
|
|
|
void HandleSetTimer(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleCancelTimer(Entity* targetEntity, std::string args);
|
2023-03-25 10:26:39 +00:00
|
|
|
void HandlePlayCinematic(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleToggleBBB(Entity* targetEntity, std::string args);
|
|
|
|
void HandleUpdateMission(Entity* targetEntity, std::vector<std::string> argArray);
|
2023-08-23 19:53:02 +00:00
|
|
|
void HandleTurnAroundOnPath(Entity* targetEntity);
|
|
|
|
void HandleGoForwardOnPath(Entity* targetEntity);
|
|
|
|
void HandleGoBackwardOnPath(Entity* targetEntity);
|
|
|
|
void HandleStopPathing(Entity* targetEntity);
|
|
|
|
void HandleStartPathing(Entity* targetEntity);
|
2023-03-25 10:26:39 +00:00
|
|
|
void HandlePlayEffect(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleCastSkill(Entity* targetEntity, std::string args);
|
|
|
|
void HandleSetPhysicsVolumeEffect(Entity* targetEntity, std::vector<std::string> argArray);
|
|
|
|
void HandleSetPhysicsVolumeStatus(Entity* targetEntity, std::string args);
|
|
|
|
void HandleActivateSpawnerNetwork(std::string args);
|
|
|
|
void HandleDeactivateSpawnerNetwork(std::string args);
|
|
|
|
void HandleResetSpawnerNetwork(std::string args);
|
|
|
|
void HandleDestroySpawnerNetworkObjects(std::string args);
|
|
|
|
void HandleActivatePhysics(Entity* targetEntity, std::string args);
|
2023-02-10 08:29:53 +00:00
|
|
|
|
|
|
|
LUTriggers::Trigger* m_Trigger;
|
|
|
|
};
|
|
|
|
#endif //!__TRIGGERCOMPONENT__H__
|