30 lines
564 B
C++
30 lines
564 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "LMStaticResupply.h"
|
|
|
|
#include "Ammo/LMAmmo.h"
|
|
|
|
|
|
ULMStaticResupply::ULMStaticResupply()
|
|
{
|
|
PrimaryComponentTick.bCanEverTick = true;
|
|
|
|
}
|
|
|
|
|
|
void ULMStaticResupply::BeginPlay()
|
|
{
|
|
Super::BeginPlay();
|
|
|
|
|
|
}
|
|
|
|
void ULMStaticResupply::SpawnResupply_Implementation()
|
|
{
|
|
FVector SpawnLocation = GetOwner()->GetActorLocation();
|
|
FRotator SpawnRotation = GetOwner()->GetActorRotation();
|
|
|
|
ALMAmmo* Ammo = GetWorld()->SpawnActor<ALMAmmo>(AmmoToSpawn, SpawnLocation, SpawnRotation);
|
|
}
|