ExoWest/Source/Exo/Private/Items/GunBase.cpp
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

31 lines
471 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "Items/GunBase.h"
#include "Characters/Components/ShootingComponent.h"
AGunBase::AGunBase()
{
PrimaryActorTick.bCanEverTick = true;
}
void AGunBase::BeginPlay()
{
Super::BeginPlay();
}
void AGunBase::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void AGunBase::AddAmmo(int AddValue)
{
CurrentAmmo += AddValue;
if (CurrentAmmo > MaxAmmo)
CurrentAmmo = MaxAmmo;
}