2021-12-05 17:54:36 +00:00
|
|
|
/*
|
|
|
|
* Darkflame Universe
|
|
|
|
* Copyright 2018
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BUILDBORDERCOMPONENT_H
|
|
|
|
#define BUILDBORDERCOMPONENT_H
|
|
|
|
|
|
|
|
#include "Component.h"
|
2023-03-04 07:16:37 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Component for the build border, allowing the user to start building when interacting with it
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
class BuildBorderComponent : public Component {
|
|
|
|
public:
|
2023-06-09 08:22:45 +00:00
|
|
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BUILD_BORDER;
|
2022-07-28 13:39:57 +00:00
|
|
|
|
2023-06-27 04:58:56 +00:00
|
|
|
BuildBorderComponent(Entity* parent) : Component(parent) { };
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
/**
|
|
|
|
* Causes the originator to start build with this entity as a reference point
|
|
|
|
* @param originator the entity (probably a player) that triggered the event
|
|
|
|
*/
|
2021-12-05 17:54:36 +00:00
|
|
|
void OnUse(Entity* originator) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BUILDBORDERCOMPONENT_H
|