110 lines
3.1 KiB
C++
110 lines
3.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "BaseWeaponClass.h"
|
|
#include "GameFramework/Character.h"
|
|
#include "InputActionValue.h"
|
|
#include "EndlessVendettaCharacter.generated.h"
|
|
|
|
class UWeaponInventory;
|
|
class UInputComponent;
|
|
class USkeletalMeshComponent;
|
|
class USceneComponent;
|
|
class UCameraComponent;
|
|
class UAnimMontage;
|
|
class USoundBase;
|
|
|
|
UCLASS(config=Game)
|
|
class AEndlessVendettaCharacter : public ACharacter
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
/** Pawn mesh: 1st person view (arms; seen only by self) */
|
|
UPROPERTY(VisibleDefaultsOnly, Category=Mesh)
|
|
USkeletalMeshComponent* Mesh1P;
|
|
|
|
/** First person camera */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
|
|
UCameraComponent* FirstPersonCameraComponent;
|
|
|
|
/** MappingContext */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true"))
|
|
class UInputMappingContext* DefaultMappingContext;
|
|
|
|
/** Jump Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true"))
|
|
class UInputAction* JumpAction;
|
|
|
|
/** Move Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true"))
|
|
class UInputAction* MoveAction;
|
|
|
|
/** Weapon Equip Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true"))
|
|
class UInputAction* EquipPrimaryWeapon;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input, meta=(AllowPrivateAccess = "true"))
|
|
class UInputAction* EquipSecondaryWeapon;
|
|
|
|
|
|
public:
|
|
AEndlessVendettaCharacter();
|
|
|
|
protected:
|
|
virtual void BeginPlay();
|
|
|
|
public:
|
|
|
|
/** Look Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
|
|
class UInputAction* LookAction;
|
|
|
|
/** Bool for AnimBP to switch to another animation set */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Weapon)
|
|
bool bHasRifle;
|
|
|
|
/** Setter to set the bool */
|
|
UFUNCTION(BlueprintCallable, Category = Weapon)
|
|
void SetHasRifle(bool bNewHasRifle);
|
|
|
|
/** Getter for the bool */
|
|
UFUNCTION(BlueprintCallable, Category = Weapon)
|
|
bool GetHasRifle();
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Weapons")
|
|
TSubclassOf<ABaseWeaponClass> PrimaryWeapon;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Weapons")
|
|
TSubclassOf<ABaseWeaponClass> SecondaryWeapon;
|
|
|
|
protected:
|
|
/** Called for movement input */
|
|
void Move(const FInputActionValue& Value);
|
|
|
|
/** Called for looking input */
|
|
void Look(const FInputActionValue& Value);
|
|
|
|
void EquipPrimary();
|
|
|
|
void EquipSecondary();
|
|
|
|
//Called from Player BluePrints
|
|
UFUNCTION(BlueprintCallable, Category = "Weapons")
|
|
void WeaponPickUpSystem(AActor* PickedUpWeapon);
|
|
|
|
protected:
|
|
// APawn interface
|
|
virtual void SetupPlayerInputComponent(UInputComponent* InputComponent) override;
|
|
// End of APawn interface
|
|
|
|
public:
|
|
/** Returns Mesh1P subobject **/
|
|
USkeletalMeshComponent* GetMesh1P() const { return Mesh1P; }
|
|
/** Returns FirstPersonCameraComponent subobject **/
|
|
UCameraComponent* GetFirstPersonCameraComponent() const { return FirstPersonCameraComponent; }
|
|
|
|
};
|
|
|