|
|
|
|
| #pragma once
|
|
|
| #include "Engine/LocalPlayer.h"
|
|
|
| #include "CommonLocalPlayer.generated.h"
|
|
|
| #define UE_API COMMONGAME_API
|
|
|
| class APawn;
|
| class APlayerController;
|
| class APlayerState;
|
| class FViewport;
|
| class UObject;
|
| class UPrimaryGameLayout;
|
| struct FSceneViewProjectionData;
|
|
|
| UCLASS(MinimalAPI, config=Engine, transient)
|
| class UCommonLocalPlayer : public ULocalPlayer
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
| UE_API UCommonLocalPlayer();
|
|
|
|
|
| DECLARE_MULTICAST_DELEGATE_TwoParams(FPlayerControllerSetDelegate, UCommonLocalPlayer* LocalPlayer, APlayerController* PlayerController);
|
| FPlayerControllerSetDelegate OnPlayerControllerSet;
|
|
|
|
|
| DECLARE_MULTICAST_DELEGATE_TwoParams(FPlayerStateSetDelegate, UCommonLocalPlayer* LocalPlayer, APlayerState* PlayerState);
|
| FPlayerStateSetDelegate OnPlayerStateSet;
|
|
|
|
|
| DECLARE_MULTICAST_DELEGATE_TwoParams(FPlayerPawnSetDelegate, UCommonLocalPlayer* LocalPlayer, APawn* Pawn);
|
| FPlayerPawnSetDelegate OnPlayerPawnSet;
|
|
|
| UE_API FDelegateHandle CallAndRegister_OnPlayerControllerSet(FPlayerControllerSetDelegate::FDelegate Delegate);
|
| UE_API FDelegateHandle CallAndRegister_OnPlayerStateSet(FPlayerStateSetDelegate::FDelegate Delegate);
|
| UE_API FDelegateHandle CallAndRegister_OnPlayerPawnSet(FPlayerPawnSetDelegate::FDelegate Delegate);
|
|
|
| public:
|
| UE_API virtual bool GetProjectionData(FViewport* Viewport, FSceneViewProjectionData& ProjectionData, int32 StereoViewIndex) const override;
|
|
|
| bool IsPlayerViewEnabled() const { return bIsPlayerViewEnabled; }
|
| void SetIsPlayerViewEnabled(bool bInIsPlayerViewEnabled) { bIsPlayerViewEnabled = bInIsPlayerViewEnabled; }
|
|
|
| UE_API UPrimaryGameLayout* GetRootUILayout() const;
|
|
|
| private:
|
| bool bIsPlayerViewEnabled = true;
|
| };
|
|
|
| #undef UE_API
|
|
|