Implement pause menu
This commit is contained in:
33
Source/MyProject3/SpaceshipPlayerController.h
Normal file
33
Source/MyProject3/SpaceshipPlayerController.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "SpaceshipPlayerController.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class MYPROJECT3_API ASpaceshipPlayerController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
ASpaceshipPlayerController();
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
virtual void SetupInputComponent() override;
|
||||
|
||||
// Input Action for pausing
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
|
||||
class UInputAction* PauseAction;
|
||||
|
||||
// Input Mapping Context
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Input")
|
||||
class UInputMappingContext* DefaultMappingContext;
|
||||
|
||||
private:
|
||||
// Post process component for blur effect
|
||||
UPROPERTY()
|
||||
class UPostProcessComponent* BlurPostProcess;
|
||||
|
||||
void HandlePauseAction();
|
||||
};
|
||||
Reference in New Issue
Block a user