2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Containers/Array.h"
|
|
|
|
#include "Containers/Map.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "GameFeatureAction_WorldActionBase.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "HAL/Platform.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "UObject/ObjectKey.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "UObject/UObjectGlobals.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
#include "GameFeatureAction_SplitscreenConfig.generated.h"
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
class UObject;
|
|
|
|
struct FGameFeatureDeactivatingContext;
|
|
|
|
struct FGameFeatureStateChangeContext;
|
|
|
|
struct FWorldContext;
|
|
|
|
|
2022-05-23 18:41:30 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// UGameFeatureAction_SplitscreenConfig
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GameFeatureAction responsible for granting abilities (and attributes) to actors of a specified type.
|
|
|
|
*/
|
|
|
|
UCLASS(MinimalAPI, meta = (DisplayName = "Splitscreen Config"))
|
|
|
|
class UGameFeatureAction_SplitscreenConfig final : public UGameFeatureAction_WorldActionBase
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
|
|
|
//~ Begin UGameFeatureAction interface
|
|
|
|
virtual void OnGameFeatureDeactivating(FGameFeatureDeactivatingContext& Context) override;
|
|
|
|
//~ End UGameFeatureAction interface
|
|
|
|
|
|
|
|
//~ Begin UGameFeatureAction_WorldActionBase interface
|
|
|
|
virtual void AddToWorld(const FWorldContext& WorldContext, const FGameFeatureStateChangeContext& ChangeContext) override;
|
|
|
|
//~ End UGameFeatureAction_WorldActionBase interface
|
|
|
|
|
|
|
|
public:
|
|
|
|
UPROPERTY(EditAnywhere, Category=Action)
|
|
|
|
bool bDisableSplitscreen = true;
|
|
|
|
|
|
|
|
private:
|
|
|
|
TArray<FObjectKey> LocalDisableVotes;
|
|
|
|
|
|
|
|
static TMap<FObjectKey, int32> GlobalDisableVotes;
|
|
|
|
};
|