Implement WeaponAction PlaySound

This commit is contained in:
baz 2025-04-09 23:55:10 +01:00
parent 210e8ab3c9
commit a5ae074c2b

View File

@ -4,6 +4,7 @@
#include "Weapon.h"
#include "EXPComponent.h"
#include "Kismet/GameplayStatics.h"
// Sets default values
AWeapon::AWeapon()
@ -29,6 +30,11 @@ void AWeapon::ResetWeaponTimer()
void AWeapon::FireWeaponAction_Implementation()
{
// This should be overridden in child weapon classes
if (WeaponActivatedSoundBase)
{
UGameplayStatics::PlaySound2D(GetWorld(), WeaponActivatedSoundBase);
}
}
bool AWeapon::UpgradeWeapon_Implementation()