This repository has been archived on 2025-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
TjgL 4f8ab3697a Implemented item pack effect
Signed-off-by: TjgL <lithmoneo@gmail.com>
2025-03-21 10:17:07 +01:00

23 lines
430 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "Ammo/LMAmmoPack.h"
#include "Player/LMPlayer.h"
#include "Weapon/LMWeaponManager.h"
ALMAmmoPack::ALMAmmoPack()
{
PrimaryActorTick.bCanEverTick = false;
}
void ALMAmmoPack::ConsumePack(ALMPlayer* Player)
{
Super::ConsumePack(Player);
Player->GetWeaponManager()->AddAmmoType(AmmoType, AmmoCount);
OnPackConsumed();
Despawn();
}