Source/GoMinions/Private/Container.cpp
// Called when the game starts or when spawned
Called when the game starts or when spawned
Called when the game starts or when spawned
void AContainer::BeginPlay(){
	Super::BeginPlay();
	FString EnumString = UEnum::GetValueAsString<ENeededObjectEnum>(NeededObjectEnum);
	Text->SetText(EnumString);
	Trigger->OnComponentBeginOverlap.AddDynamic(this, &AContainer::OnBoxBeginOverlap);
	Trigger->OnComponentEndOverlap.AddDynamic(this, &AContainer::OnBoxEndOverlap);
	goMinionsCharacter = Cast<AGoMinionsCharacter>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
}
void AContainer :: BeginPlay ( ) { Super :: BeginPlay ( ) ; FString EnumString = UEnum :: GetValueAsString < ENeededObjectEnum > ( NeededObjectEnum ) ; Text -> SetText ( EnumString ) ; Trigger -> OnComponentBeginOverlap . AddDynamic ( this , & AContainer :: OnBoxBeginOverlap ) ; Trigger -> OnComponentEndOverlap . AddDynamic ( this , & AContainer :: OnBoxEndOverlap ) ; goMinionsCharacter = Cast < AGoMinionsCharacter > ( UGameplayStatics :: GetPlayerCharacter ( GetWorld ( ) , 0 ) ) ; }
Called when the game starts or when spawned
Called when the game starts or when spawned