ExoWest/Source/Exo/Public/Items/GunBase.h
Kubson96 0b52fe2b4f feat: add aiming
Added aiming feature, possible when holding gun. Aiming FOV depends on gun
2025-04-04 16:33:54 +02:00

55 lines
1.3 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Interfaces/Interactable.h"
#include "GunBase.generated.h"
UCLASS()
class EXO_API AGunBase : public AActor, public IInteractable
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AGunBase();
UPROPERTY(EditAnywhere, Category = "Shooting")
float MaxRange = 2000.0f;
UPROPERTY(EditAnywhere, Category = "Shooting")
float DamageValue = 100.0f;
UPROPERTY(EditAnywhere, Category = "Shooting")
float FireRateCooldown = 1.0f;
UPROPERTY(EditAnywhere, Category = "Shooting")
float RecoilForceMultiplier = 1.0f;
UPROPERTY(EditAnywhere, Category = "Shooting")
float ReloadTime = 3.0f;
UPROPERTY(EditAnywhere, Category = "Shooting")
float AimingFOV = 55.0f;
UPROPERTY(EditAnywhere, Category = "Ammo")
int32 CurrentAmmo = 10;
UPROPERTY(EditAnywhere, Category = "Ammo")
int32 MaxAmmo = 10;
TSubclassOf<AActor> SceneItemClass;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
virtual void Interact_Implementation(AExoPlayerCharacter* playerCharacter) override;
};