Clear timer in OnUnPossess
This commit is contained in:
parent
a13cad7320
commit
929c4fa0f3
|
@ -42,6 +42,13 @@ void AVampirePlayerController::OnPossess(APawn* aPawn)
|
|||
}
|
||||
}
|
||||
|
||||
void AVampirePlayerController::OnUnPossess()
|
||||
{
|
||||
Super::OnUnPossess();
|
||||
|
||||
GetWorld()->GetTimerManager().ClearTimer(pawnLifeTimeHandle);
|
||||
}
|
||||
|
||||
void AVampirePlayerController::UpdatePlayerEXPHUD(int exp, float currentLevelPercent)
|
||||
{
|
||||
if (currentPlayerHUD)
|
||||
|
|
|
@ -29,6 +29,8 @@ private:
|
|||
protected:
|
||||
virtual void OnPossess(APawn* aPawn) override;
|
||||
|
||||
virtual void OnUnPossess() override;
|
||||
|
||||
UFUNCTION()
|
||||
void UpdatePlayerEXPHUD(int exp, float currentLevelPercent);
|
||||
|
||||
|
|
Loading…
Reference in New Issue