Save Game on LevelKeyPickup Overlap
This commit is contained in:
parent
2e554be13a
commit
6e822f88b0
|
@ -29,6 +29,7 @@ void ALevelKeyPickup::OnOverlapBegin(UPrimitiveComponent* OverlappedComponent, A
|
|||
if (auto gameInstance = Cast<UNakatomiGameInstance>(UGameplayStatics::GetGameInstance(GetWorld())))
|
||||
{
|
||||
gameInstance->GetCurrentLevelManager()->IncrementCollectedLevelKeys();
|
||||
gameInstance->SaveGame();
|
||||
}
|
||||
|
||||
Super::OnOverlapBegin(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult);
|
||||
|
|
Loading…
Reference in New Issue