mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 00:01:37 -07:00
Cleanup
This commit is contained in:
@@ -6,21 +6,26 @@
|
||||
#include "CogAll.h"
|
||||
#include "CogSampleWindow_Team.h"
|
||||
#include "CogSubsystem.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void UCogSampleGameInstance::Init()
|
||||
{
|
||||
Super::Init();
|
||||
|
||||
#if ENABLE_COG
|
||||
|
||||
// Get the cog subsystem
|
||||
if (UCogSubsystem* CogSubSystem = GetSubsystem<UCogSubsystem>())
|
||||
{
|
||||
// Add all the built-in windows. You copy paste this function code to organize the menu differently.
|
||||
Cog::AddAllWindows(*CogSubSystem);
|
||||
|
||||
// Add a custom window
|
||||
CogSubSystem->AddWindow<FCogSampleWindow_Team>("Gameplay.Team");
|
||||
|
||||
// Activate Cog
|
||||
CogSubSystem->Activate();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogSampleGameInstance.generated.h"
|
||||
|
||||
class UCogSubsystem;
|
||||
class UCogSampleAbilitySystemComponent;
|
||||
|
||||
UCLASS()
|
||||
class UCogSampleGameInstance : public UGameInstance
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
virtual void Init() override;
|
||||
void Init() override;
|
||||
};
|
||||
|
||||
@@ -30,20 +30,12 @@ private:
|
||||
UPROPERTY()
|
||||
UCogSampleAbilitySystemComponent* AbilitySystemComponent = nullptr;
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// To make sure it doesn't get garbage collected.
|
||||
//---------------------------------------------------------------------------------
|
||||
UPROPERTY()
|
||||
TObjectPtr<UObject> CogWindowManagerRef = nullptr;
|
||||
|
||||
protected:
|
||||
UPROPERTY(Replicated)
|
||||
float _ServerFramerateRaw = 0.0f;
|
||||
|
||||
#if ENABLE_COG
|
||||
|
||||
TObjectPtr<UCogSubsystem> CogWindowManager = nullptr;
|
||||
|
||||
|
||||
float _ClientFramerateSmooth = 0.0f;
|
||||
|
||||
float _ServerFramerateSmooth = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user