Compare commits
2 Commits
390b50547b
...
a31e00c6e4
Author | SHA1 | Date | |
---|---|---|---|
a31e00c6e4 | |||
7611c87e21 |
@ -44,12 +44,15 @@ void AEnemyCharacter::OnDamaged(FDamageInfo damageInfo)
|
|||||||
|
|
||||||
void AEnemyCharacter::OnDeath(FDamageInfo damageInfo)
|
void AEnemyCharacter::OnDeath(FDamageInfo damageInfo)
|
||||||
{
|
{
|
||||||
|
// TODO: Replace pickup spawning with pooling
|
||||||
FActorSpawnParameters actorSpawnParameters;
|
FActorSpawnParameters actorSpawnParameters;
|
||||||
actorSpawnParameters.Owner = this;
|
actorSpawnParameters.Owner = this;
|
||||||
actorSpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
actorSpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||||
actorSpawnParameters.TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot;
|
|
||||||
|
|
||||||
GetWorld()->SpawnActor<AEXPPickup>(EXPPickupTemplate, GetActorLocation(), FRotator::ZeroRotator,
|
auto spawnLocation = GetActorLocation();
|
||||||
|
spawnLocation.Z = 75.0f;
|
||||||
|
|
||||||
|
GetWorld()->SpawnActor<AEXPPickup>(EXPPickupTemplate, spawnLocation, FRotator::ZeroRotator,
|
||||||
actorSpawnParameters);
|
actorSpawnParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ void AVampireGameMode::SpawnEnemy()
|
|||||||
{
|
{
|
||||||
healthComponent->OnDeath.AddDynamic(this, &AVampireGameMode::HandleOnEnemyDeath);
|
healthComponent->OnDeath.AddDynamic(this, &AVampireGameMode::HandleOnEnemyDeath);
|
||||||
}
|
}
|
||||||
|
healthComponent->ResetHealth();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user