ExoWest/Source/Exo/Public/Items/GunBase.h
Kubson96 672b19326b feat: gun attaching to socket
Added FirstPersonArm from Unreal FPS template.
Modified ShootingComponent for using socket in character.
2025-04-22 23:28:59 +02:00

55 lines
1.2 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AmmoBoxBase.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:
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;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Ammo")
EAmmoType AmmoType = EAmmoType::Revolver;
UFUNCTION(Category = "Ammo")
void AddAmmo(int AddValue);
protected:
virtual void BeginPlay() override;
public:
virtual void Tick(float DeltaTime) override;
};