Skip to content
Snippets Groups Projects
Commit 743fd1c7 authored by Yannis's avatar Yannis
Browse files

Merge branch 'feat/gameplay'

parents 911275d5 47aeb513
No related branches found
No related tags found
No related merge requests found
No preview for this file type
File added
...@@ -218,7 +218,7 @@ void APlayerCar::OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor ...@@ -218,7 +218,7 @@ void APlayerCar::OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor
} }
} }
else { else {
UGameplayStatics::OpenLevel(GetWorld(), "MainMenu", false, FString::Printf(TEXT("Score=%d"), PlayerCarState->GetScore())); UGameplayStatics::OpenLevel(GetWorld(), "MainMenu", false, FString::Printf(TEXT("Score=%d"), PlayerCarState->GetiScore()));
} }
} }
} }
......
...@@ -47,7 +47,7 @@ void APlayerCarState::AddScore(int score) ...@@ -47,7 +47,7 @@ void APlayerCarState::AddScore(int score)
iScore += score; iScore += score;
} }
int APlayerCarState::GetScore() int APlayerCarState::GetiScore()
{ {
return iScore; return iScore;
} }
......
...@@ -39,7 +39,8 @@ public: ...@@ -39,7 +39,8 @@ public:
// Adder for the score // Adder for the score
void AddScore(int score = 1); void AddScore(int score = 1);
// Getter for the score // Getter for the score
int GetScore(); UFUNCTION(BlueprintCallable, Category = "Score")
int GetiScore();
// Reset the score // Reset the score
void ResetScore(); void ResetScore();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment