GASATHON/Project/Source/Gasa/Game/GasaGameState.cpp

35 lines
747 B
C++
Raw Normal View History

2024-04-12 19:05:09 -07:00
#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