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)
|
void AVampirePlayerController::UpdatePlayerEXPHUD(int exp, float currentLevelPercent)
|
||||||
{
|
{
|
||||||
if (currentPlayerHUD)
|
if (currentPlayerHUD)
|
||||||
|
|
|
@ -29,6 +29,8 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual void OnPossess(APawn* aPawn) override;
|
virtual void OnPossess(APawn* aPawn) override;
|
||||||
|
|
||||||
|
virtual void OnUnPossess() override;
|
||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void UpdatePlayerEXPHUD(int exp, float currentLevelPercent);
|
void UpdatePlayerEXPHUD(int exp, float currentLevelPercent);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue