// Multiplayer By Caleb

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "CPlayerController.generated.h"

class UGameplayWidget;
class ACPlayerCharacter;

UCLASS()
class CRUNCH_API ACPlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	virtual void OnPossess(APawn* InPawn) override;
	virtual void AcknowledgePossession(APawn* P) override;

private:
	void SpawnGameplayWidget();

	UPROPERTY()
	TObjectPtr<ACPlayerCharacter> CPlayerCharacter;
	UPROPERTY(EditDefaultsOnly, Category= "UI")
	TSubclassOf<UGameplayWidget> GameplayWidgetClass;
	UPROPERTY()
	TObjectPtr<UGameplayWidget> GameplayWidget;
};
