VampirePlayerController cleanup
This commit is contained in:
parent
929c4fa0f3
commit
e694e647b0
|
@ -4,7 +4,6 @@
|
||||||
#include "VampirePlayerController.h"
|
#include "VampirePlayerController.h"
|
||||||
|
|
||||||
#include "EXPComponent.h"
|
#include "EXPComponent.h"
|
||||||
#include "HealthComponent.h"
|
|
||||||
#include "VampireGameMode.h"
|
#include "VampireGameMode.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
@ -25,9 +24,8 @@ void AVampirePlayerController::OnPossess(APawn* aPawn)
|
||||||
UpdatePlayerEXPHUD(expComponent->GetCurrentEXP(), expComponent->GetCurrentLevelPercent());
|
UpdatePlayerEXPHUD(expComponent->GetCurrentEXP(), expComponent->GetCurrentLevelPercent());
|
||||||
UpdatePlayerLevelHUD(expComponent->GetCurrentLevel());
|
UpdatePlayerLevelHUD(expComponent->GetCurrentLevel());
|
||||||
}
|
}
|
||||||
|
|
||||||
AVampireGameMode* gamemode = Cast<AVampireGameMode>(UGameplayStatics::GetGameMode(GetWorld()));
|
if (AVampireGameMode* gamemode = Cast<AVampireGameMode>(UGameplayStatics::GetGameMode(GetWorld())))
|
||||||
if (gamemode)
|
|
||||||
{
|
{
|
||||||
gamemode->OnEnemyDeathCountIncrementDelegate.AddDynamic(this, &AVampirePlayerController::UpdateKillCountHUD);
|
gamemode->OnEnemyDeathCountIncrementDelegate.AddDynamic(this, &AVampirePlayerController::UpdateKillCountHUD);
|
||||||
UpdateKillCountHUD(gamemode->GetEnemyDeathCount());
|
UpdateKillCountHUD(gamemode->GetEnemyDeathCount());
|
||||||
|
|
Loading…
Reference in New Issue