GASATHON/Project/Source/Gasa/GasaGameState.cpp
2024-04-12 22:05:09 -04:00

35 lines
747 B
C++

#include "GasaGameState.h"
#include "CogAll.h"
#include "CogWindowManager.h"
AGasaGameState::AGasaGameState()
{
// Enable ticking
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.SetTickFunctionEnable(true);
PrimaryActorTick.bStartWithTickEnabled = true;
}
#pragma region GameState
void AGasaGameState::BeginPlay()
{
#if ENABLE_COG
CogWindowManager = NewObject<UCogWindowManager>(this);
CogWindowManagerRef = CogWindowManager;
// Add all the built-in windows
Cog::AddAllWindows(*CogWindowManager);
#endif //ENABLE_COG
}
void AGasaGameState::Tick(float DeltaSeconds)
{
Super::Tick(DeltaSeconds);
#if ENABLE_COG
CogWindowManager->Tick(DeltaSeconds);
#endif //ENABLE_COG
}
#pragma endregion GameState