19 lines
461 B
C++
19 lines
461 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "HYMoneyAutoPickUp.h"
|
|
#include "HYPlayerCharacController.h"
|
|
|
|
AHYMoneyAutoPickUp::AHYMoneyAutoPickUp()
|
|
{
|
|
Super::ItemID = FName("Lost soul");
|
|
Value = 1;
|
|
}
|
|
|
|
void AHYMoneyAutoPickUp::Collect_Implementation(APlayerController* Controller)
|
|
{
|
|
AHYPlayerCharacController* IController = Cast<AHYPlayerCharacController>(Controller);
|
|
IController->Currency += Value;
|
|
Destroy();
|
|
}
|