blaster/Source/Blaster/Pickups/JumpPickup.cpp

20 lines
431 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "JumpPickup.h"
#include "Blaster/Character/BlasterCharacter.h"
#include "Blaster/Components/BuffComponent.h"
void AJumpPickup::OnOverlap(ABlasterCharacter* BlasterCharacter)
{
Super::OnOverlap(BlasterCharacter);
if (UBuffComponent* Buff = BlasterCharacter->GetBuff())
{
Buff->BuffJump(JumpZVelocity, JumpBuffTime);
}
Destroy();
}