2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Component.h"
|
|
|
|
#include "Entity.h"
|
2023-03-04 07:16:37 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2023-12-29 04:24:45 +00:00
|
|
|
#include <cstdint>
|
|
|
|
#include <array>
|
|
|
|
#include "dCommonVars.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component that handles the LOT that is shown in the LUP exhibit in the LUP world. Works by setting a timer and
|
|
|
|
* switching the LOTs around that we'd like to display.
|
|
|
|
*/
|
|
|
|
class LUPExhibitComponent : public Component
|
|
|
|
{
|
|
|
|
public:
|
2023-12-29 04:24:45 +00:00
|
|
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::LUP_EXHIBIT;
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2023-12-29 04:24:45 +00:00
|
|
|
LUPExhibitComponent(Entity* parent) : Component(parent) {};
|
2022-07-28 13:39:57 +00:00
|
|
|
void Update(float deltaTime) override;
|
2023-08-10 21:33:15 +00:00
|
|
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
2023-12-29 04:24:45 +00:00
|
|
|
void NextLUPExhibit();
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
2023-12-29 04:24:45 +00:00
|
|
|
float m_UpdateTimer = 0.0f;
|
|
|
|
std::array<LOT, 4> m_LUPExhibits = { 11121, 11295, 11423, 11979 };
|
|
|
|
uint8_t m_LUPExhibitIndex = 0;
|
|
|
|
bool m_DirtyLUPExhibit = true;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|