mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 08:02:23 -07:00
e72504b47a
CogWindows are now normal object because we want to be able to Ifdef them, and UObject cannot be ifdef. CogWindows were UObject mainly for saving their config. The configs have been moved in separated class, which are UObject.
47 lines
1.4 KiB
C++
47 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CogCommon.h"
|
|
#include "GameFramework/GameStateBase.h"
|
|
#include "CogSampleGameState.generated.h"
|
|
|
|
class UCogWindowManager;
|
|
class UCogSampleAbilitySystemComponent;
|
|
|
|
UCLASS()
|
|
class ACogSampleGameState : public AGameStateBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
ACogSampleGameState(const FObjectInitializer& ObjectInitializer);
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
|
|
|
virtual void Tick(float DeltaSeconds) override;
|
|
|
|
private:
|
|
|
|
//---------------------------------------------------------------------------------
|
|
// To make sure it doesn't get garbage collected.
|
|
//---------------------------------------------------------------------------------
|
|
UPROPERTY()
|
|
TObjectPtr<UObject> CogWindowManagerRef = nullptr;
|
|
|
|
//---------------------------------------------------------------------------------
|
|
// The game state has an AbilitySystemComponent to serve as the default instigator
|
|
// for effects that are not applied by characters.
|
|
//---------------------------------------------------------------------------------
|
|
UPROPERTY()
|
|
UCogSampleAbilitySystemComponent* AbilitySystemComponent = nullptr;
|
|
|
|
#if ENABLE_COG
|
|
|
|
void InitializeCog();
|
|
|
|
TObjectPtr<UCogWindowManager> CogWindowManager = nullptr;
|
|
|
|
#endif //ENABLE_COG
|
|
};
|