23 lines
430 B
C++
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();
|
|
}
|