Add Methods to Pick Weapon Mesh, Sound and Impact Field

This commit is contained in:
Louis Hobbs 2023-02-12 20:29:59 +00:00
parent bc26d04f83
commit ec9617fe51
2 changed files with 36 additions and 1 deletions

View File

@ -36,6 +36,35 @@ AWeapon URandomWeaponParameters::GenerateWeapon()
}
AWeaponPickup URandomWeaponParameters::GenerateWeaponPickup()
USkeletalMesh* URandomWeaponParameters::PickRandomMesh()
{
return AWeaponPickup();
// TODO: CHANGE THIS, THIS IS BAD, THIS IS TEMPORARY, GOOD GOD WHY
if (WeaponMesh.Num() == 0)
{
throw;
}
return WeaponMesh[FMath::RandRange(0, WeaponMesh.Num() - 1)];
}
USoundBase* URandomWeaponParameters::PickRandomSoundBase()
{
// TODO: CHANGE THIS, THIS IS BAD, THIS IS TEMPORARY, GOOD GOD WHY
if (FireSound.Num() == 0)
{
return nullptr;
}
return FireSound[FMath::RandRange(0, FireSound.Num() - 1)];
}
TSubclassOf<class ANakatomiFieldSystemActor> URandomWeaponParameters::PickRandomFieldSystem()
{
// TODO: CHANGE THIS, THIS IS BAD, THIS IS TEMPORARY, GOOD GOD WHY
if (FieldSystemActor.Num() == 0)
{
throw;
}
return FieldSystemActor[FMath::RandRange(0, FieldSystemActor.Num() - 1)];
}

View File

@ -83,4 +83,10 @@ public:
AWeapon GenerateWeapon();
AWeaponPickup GenerateWeaponPickup();
USkeletalMesh* PickRandomMesh();
USoundBase* PickRandomSoundBase();
TSubclassOf<class ANakatomiFieldSystemActor> PickRandomFieldSystem();
};