Initial Commit - Lesson 31 (Commit #1)
This commit is contained in:
58
Source/FPSTemplate/Public/Player/ShooterPlayerController.h
Normal file
58
Source/FPSTemplate/Public/Player/ShooterPlayerController.h
Normal file
@@ -0,0 +1,58 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "ShooterPlayerController.generated.h"
|
||||
|
||||
struct FInputActionValue;
|
||||
class UInputMappingContext;
|
||||
class UInputAction;
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnPlayerStateReplicated);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class FPSTEMPLATE_API AShooterPlayerController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
AShooterPlayerController();
|
||||
bool bPawnAlive;
|
||||
virtual void OnPossess(APawn* InPawn) override;
|
||||
virtual void OnRep_PlayerState() override;
|
||||
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FOnPlayerStateReplicated OnPlayerStateReplicated;
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
virtual void SetupInputComponent() override;
|
||||
private:
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputMappingContext> ShooterIMC;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputAction> MoveAction;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputAction> LookAction;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputAction> CrouchAction;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputAction> JumpAction;
|
||||
|
||||
|
||||
void Input_Move(const FInputActionValue& InputActionValue);
|
||||
void Input_Look(const FInputActionValue& InputActionValue);
|
||||
void Input_Crouch();
|
||||
void Input_Jump();
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user