Advertisement
N0B0DY1x

PlayerCharacter.h

Dec 1st, 2020
1,766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.44 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Character.h"
  7. #include "Camera/CameraComponent.h"
  8. #include "PlayerCharacter.generated.h"
  9.  
  10. UCLASS()
  11. class GAMEPROJECT_API APlayerCharacter : public ACharacter
  12. {
  13.     GENERATED_BODY()
  14.  
  15.     /** Camera boom positioning the camera behind the character */
  16.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
  17.     class USpringArmComponent* CameraBoom;
  18.  
  19.     /** Follow camera */
  20.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
  21.     class UCameraComponent* TPSCamera;
  22.  
  23.     /** FPS camera */
  24.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
  25.     class UCameraComponent* FPSCamera;
  26.  
  27. public:
  28.     // Sets default values for this character's properties
  29.     APlayerCharacter();
  30.  
  31. protected:
  32.     // Called when the game starts or when spawned
  33.     virtual void BeginPlay() override;
  34.  
  35.     UPROPERTY()
  36.     bool bThirdPerson;
  37.  
  38. public:
  39.     // Called to bind functionality to input
  40.     virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  41.  
  42.     UFUNCTION()
  43.     void MoveForward(const float Value);
  44.  
  45.     UFUNCTION()
  46.     void MoveRight(const float Value);
  47.  
  48.     UFUNCTION()
  49.     void StartJump();
  50.  
  51.     UFUNCTION()
  52.     void StopJump();
  53.  
  54.     UFUNCTION()
  55.     void ChangeView();
  56. };
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement