Save Game on LevelKeyPickup Overlap

This commit is contained in:
baz 2024-05-27 20:30:37 +01:00
parent 2e554be13a
commit 6e822f88b0
1 changed files with 1 additions and 0 deletions

View File

@ -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);