Compare commits

..

2 Commits

Author SHA1 Message Date
baz
0f856ea26d Create Light, Normal and Heavy Enemies 2025-09-15 23:32:24 +01:00
baz
f549ed403d Add Damage parameter to Data Asset 2025-09-15 23:32:07 +01:00
12 changed files with 33 additions and 14 deletions

BIN
Content/Enemy/DA_Enemy.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Enemy/DA_HeavyEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/DA_LightEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/DA_NormalEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Gamemode/BP_DefaultGamemode.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Meshes/SM_Enemy.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Meshes/SM_HeavyEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Meshes/SM_LightEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Meshes/SM_NormalEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -118,6 +118,7 @@ void AEnemyCharacter::LoadDataFromDataAsset_Implementation(UEnemyDataAsset* Enem
OnDeathNiagaraSystem = EnemyDataAsset->OnDeathNiagaraSystem;
HealthComponent->SetMaxHealth(EnemyDataAsset->MaxHealth);
GetCharacterMovement()->MaxWalkSpeed = EnemyDataAsset->MovementSpeed;
Damage = EnemyDataAsset->Damage;
PickupArray.Add(EnemyDataAsset->CommonPickupDataAsset);
PickupArray.Add(EnemyDataAsset->UncommonPickupDataAsset);
@ -136,6 +137,7 @@ void AEnemyCharacter::ResetData_Implementation()
OnDeathNiagaraSystem = nullptr;
HealthComponent->SetMaxHealth(100.0f);
GetCharacterMovement()->MaxWalkSpeed = 300.0f;
Damage = 5.0f;
}
float AEnemyCharacter::GetCapsuleRadius_Implementation()

View File

@ -51,4 +51,7 @@ public:
UPROPERTY(EditDefaultsOnly, Category = "Properties")
float MovementSpeed = 300.0f;
UPROPERTY(EditDefaultsOnly, Category = "Properties")
float Damage = 5.0f;
};

View File

@ -148,12 +148,14 @@ AObjectPoolManager* AVampireGameMode::GetPickupObjectPoolManager_Implementation(
void AVampireGameMode::AddRandomEnemyTypeToPool()
{
if (EnemyDataAssets.Num() > 0)
{
int32 rand = FMath::RandRange(0, EnemyDataAssets.Num() - 1);
SpawnableEnemyDataAssets.Add(EnemyDataAssets[rand]);
EnemyDataAssets.RemoveAt(rand);
}
// if (EnemyDataAssets.Num() > 0)
// {
// int32 rand = FMath::RandRange(0, EnemyDataAssets.Num() - 1);
// SpawnableEnemyDataAssets.Add(EnemyDataAssets[rand]);
// EnemyDataAssets.RemoveAt(rand);
// }
SpawnableEnemyDataAssets = EnemyDataAssets;
}
void AVampireGameMode::OnPlayerDeath(FDamageInfo DamageInfo)