This commit is contained in:
John
2026-03-11 11:25:15 +05:30
parent bcd6f827d5
commit 0327abb1a0
77 changed files with 7689 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Logging/LogMacros.h"
#include "AudioVideoRecordCharacter.generated.h"
class UInputComponent;
class USkeletalMeshComponent;
class UCameraComponent;
class UInputAction;
struct FInputActionValue;
DECLARE_LOG_CATEGORY_EXTERN(LogTemplateCharacter, Log, All);
/**
* A basic first person character
*/
UCLASS(abstract)
class AAudioVideoRecordCharacter : public ACharacter
{
GENERATED_BODY()
/** Pawn mesh: first person view (arms; seen only by self) */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components", meta = (AllowPrivateAccess = "true"))
USkeletalMeshComponent* FirstPersonMesh;
/** First person camera */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Components", meta = (AllowPrivateAccess = "true"))
UCameraComponent* FirstPersonCameraComponent;
protected:
/** Jump Input Action */
UPROPERTY(EditAnywhere, Category ="Input")
UInputAction* JumpAction;
/** Move Input Action */
UPROPERTY(EditAnywhere, Category ="Input")
UInputAction* MoveAction;
/** Look Input Action */
UPROPERTY(EditAnywhere, Category ="Input")
class UInputAction* LookAction;
/** Mouse Look Input Action */
UPROPERTY(EditAnywhere, Category ="Input")
class UInputAction* MouseLookAction;
public:
AAudioVideoRecordCharacter();
protected:
/** Called from Input Actions for movement input */
void MoveInput(const FInputActionValue& Value);
/** Called from Input Actions for looking input */
void LookInput(const FInputActionValue& Value);
/** Handles aim inputs from either controls or UI interfaces */
UFUNCTION(BlueprintCallable, Category="Input")
virtual void DoAim(float Yaw, float Pitch);
/** Handles move inputs from either controls or UI interfaces */
UFUNCTION(BlueprintCallable, Category="Input")
virtual void DoMove(float Right, float Forward);
/** Handles jump start inputs from either controls or UI interfaces */
UFUNCTION(BlueprintCallable, Category="Input")
virtual void DoJumpStart();
/** Handles jump end inputs from either controls or UI interfaces */
UFUNCTION(BlueprintCallable, Category="Input")
virtual void DoJumpEnd();
protected:
/** Set up input action bindings */
virtual void SetupPlayerInputComponent(UInputComponent* InputComponent) override;
public:
/** Returns the first person mesh **/
USkeletalMeshComponent* GetFirstPersonMesh() const { return FirstPersonMesh; }
/** Returns first person camera component **/
UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
};