blaster/Source/Blaster/Pickups/SpeedPickup.cpp

20 lines
453 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "SpeedPickup.h"
#include "Blaster/Character/BlasterCharacter.h"
#include "Blaster/Components/BuffComponent.h"
void ASpeedPickup::OnOverlap(ABlasterCharacter* BlasterCharacter)
{
Super::OnOverlap(BlasterCharacter);
if (UBuffComponent* Buff = BlasterCharacter->GetBuff())
{
Buff->BuffSpeed(BaseSpeedBuff, CrouchSpeedBuff, SpeedBuffTime);
}
Destroy();
}