34 lines
762 B
C++
34 lines
762 B
C++
// Project Lab - NHTV Igad
|
|
|
|
#pragma once
|
|
|
|
#include "Blueprint/UserWidget.h"
|
|
#include "PlayerSlot.generated.h"
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class UNREALPROJECT_API UPlayerSlot : public UUserWidget
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPlayerSlot(const FObjectInitializer& init);
|
|
virtual void NativeConstruct() override;
|
|
void Init(class APlayerStateBase* playerState, bool isLocal = false);
|
|
|
|
UFUNCTION(BlueprintNativeEvent, Category = "Player")
|
|
void OnChanged();
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Player")
|
|
class APlayerStateBase* currentPlayerState;
|
|
UPROPERTY(BlueprintReadOnly, Category = "Player")
|
|
bool isLocal;
|
|
|
|
private:
|
|
// Keep this boolean to detect currentPlayerState becoming invalid(nullptr)
|
|
bool m_playerStateSet;
|
|
|
|
};
|