document.write("
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AbilitySystemInterface.h"
#include "GameFramework/PlayerState.h"
#include "DandelionPlayerState.generated.h"
class UDandelionAbilitySet;
/**
* Base Dandelion PlayerState that owns the AbilitySystemComponent and also defines some default GameplayAbilitySets
* that should be applied when the ASC is initialized.
*/
UCLASS()
class DANDELION_API ADandelionPlayerState : public APlayerState, public IAbilitySystemInterface
{
GENERATED_BODY()
#pragma region IAbilitySystemInterface
public:
/**
* Simple getter for the ASC.
* @return The ASC on this PlayerState.
*/
virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
#pragma endregion
/**
* Instantiates an ASC by default.
*/
ADandelionPlayerState();
/**
* Initialization method that applies the DefaultGameplayAbilitySets. To be called by the PlayerCharacter as part of
* its InitAbilitySystem method.
*/
void InitAbilitySystem() const;
private:
/**
* ASC owned by this PlayerState.
*/
UPROPERTY(BlueprintReadOnly, meta=(AllowPrivateAccess))
TObjectPtr<UAbilitySystemComponent> AbilitySystemComponent;
/**
* GameplayAbilitySets that should be applied when the ASC is initialized.
*/
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "AbilitySystem", meta = (AllowPrivateAccess = "true"))
TSet<TObjectPtr<UDandelionAbilitySet>> DefaultGameplayAbilitySets;
};
DandelionPlayerState.h - Snippet hosted by \"Cacher\"
");