format codebase

This commit is contained in:
aronwk-aaron
2022-07-28 08:39:57 -05:00
parent 4f7aa11067
commit 19e77a38d8
881 changed files with 34700 additions and 38689 deletions

View File

@@ -2,50 +2,43 @@
#include "EntityManager.h"
LUPExhibitComponent::LUPExhibitComponent(Entity* parent) : Component(parent)
{
m_Exhibits = { 11121, 11295, 11423, 11979 };
LUPExhibitComponent::LUPExhibitComponent(Entity* parent) : Component(parent) {
m_Exhibits = { 11121, 11295, 11423, 11979 };
m_ExhibitIndex = 0;
m_ExhibitIndex = 0;
m_Exhibit = m_Exhibits[m_ExhibitIndex];
m_Exhibit = m_Exhibits[m_ExhibitIndex];
}
LUPExhibitComponent::~LUPExhibitComponent()
{
LUPExhibitComponent::~LUPExhibitComponent() {
}
void LUPExhibitComponent::Update(float deltaTime)
{
m_UpdateTimer += deltaTime;
void LUPExhibitComponent::Update(float deltaTime) {
m_UpdateTimer += deltaTime;
if (m_UpdateTimer > 20.0f)
{
NextExhibit();
if (m_UpdateTimer > 20.0f) {
NextExhibit();
m_UpdateTimer = 0.0f;
}
m_UpdateTimer = 0.0f;
}
}
void LUPExhibitComponent::NextExhibit()
{
m_ExhibitIndex++;
void LUPExhibitComponent::NextExhibit() {
m_ExhibitIndex++;
if (m_ExhibitIndex >= m_Exhibits.size())
{
m_ExhibitIndex = 0;
}
if (m_ExhibitIndex >= m_Exhibits.size()) {
m_ExhibitIndex = 0;
}
m_Exhibit = m_Exhibits[m_ExhibitIndex];
m_Exhibit = m_Exhibits[m_ExhibitIndex];
EntityManager::Instance()->SerializeEntity(m_Parent);
EntityManager::Instance()->SerializeEntity(m_Parent);
}
void LUPExhibitComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, uint32_t& flags)
{
outBitStream->Write1(); // Dirty flag?
outBitStream->Write(m_Exhibit);
void LUPExhibitComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, uint32_t& flags) {
outBitStream->Write1(); // Dirty flag?
outBitStream->Write(m_Exhibit);
}