blaster/Source/Blaster/Pickups/JumpPickup.cpp

20 lines
431 B
C++
Raw Permalink Normal View History

2022-05-22 23:53:02 +00:00
// 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"
2022-05-23 21:45:28 +00:00
void AJumpPickup::OnOverlap(ABlasterCharacter* BlasterCharacter)
2022-05-22 23:53:02 +00:00
{
2022-05-23 21:45:28 +00:00
Super::OnOverlap(BlasterCharacter);
2022-05-22 23:53:02 +00:00
2022-05-23 21:45:28 +00:00
if (UBuffComponent* Buff = BlasterCharacter->GetBuff())
2022-05-22 23:53:02 +00:00
{
2022-05-23 21:45:28 +00:00
Buff->BuffJump(JumpZVelocity, JumpBuffTime);
2022-05-22 23:53:02 +00:00
}
Destroy();
}