Initial HUD implementation and timer + game over
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
#include "DrawDebugHelpers.h"
|
||||
#include "Math/UnrealMathUtility.h"
|
||||
#include "EnemyProjectile.h"
|
||||
|
||||
// Include SpaceshipPawn to access player-specific functionality
|
||||
#include "SpaceShooterGameMode.h"
|
||||
#include "SpaceshipPawn.h"
|
||||
|
||||
AEnemySpaceship::AEnemySpaceship()
|
||||
@@ -559,6 +558,11 @@ void AEnemySpaceship::Die()
|
||||
GetActorLocation()
|
||||
);
|
||||
|
||||
if (ASpaceShooterGameMode* GameMode = Cast<ASpaceShooterGameMode>(UGameplayStatics::GetGameMode(GetWorld())))
|
||||
{
|
||||
GameMode->IncrementKillCount();
|
||||
}
|
||||
|
||||
// Destroy the enemy
|
||||
Destroy();
|
||||
}
|
||||
Reference in New Issue
Block a user