2024-10-30 07:30:20 +00:00
|
|
|
#ifndef COLLECTIBLECOMPONENT_H
|
|
|
|
#define COLLECTIBLECOMPONENT_H
|
2023-10-23 01:08:49 +00:00
|
|
|
|
|
|
|
#include "Component.h"
|
|
|
|
#include "eReplicaComponentType.h"
|
|
|
|
|
2024-01-24 05:13:23 +00:00
|
|
|
class CollectibleComponent final : public Component {
|
2023-10-23 01:08:49 +00:00
|
|
|
public:
|
2024-01-24 05:13:23 +00:00
|
|
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::COLLECTIBLE;
|
2023-10-23 01:08:49 +00:00
|
|
|
CollectibleComponent(Entity* parentEntity, int32_t collectibleId) : Component(parentEntity), m_CollectibleId(collectibleId) {}
|
|
|
|
|
|
|
|
int16_t GetCollectibleId() const { return m_CollectibleId; }
|
2024-02-27 07:25:44 +00:00
|
|
|
void Serialize(RakNet::BitStream& outBitStream, bool isConstruction) override;
|
2023-10-23 01:08:49 +00:00
|
|
|
private:
|
|
|
|
int16_t m_CollectibleId = 0;
|
|
|
|
};
|
|
|
|
|
2024-10-30 07:30:20 +00:00
|
|
|
#endif //!COLLECTIBLECOMPONENT_H
|