Implement WeaponAction PlaySound
This commit is contained in:
parent
210e8ab3c9
commit
a5ae074c2b
@ -4,6 +4,7 @@
|
|||||||
#include "Weapon.h"
|
#include "Weapon.h"
|
||||||
|
|
||||||
#include "EXPComponent.h"
|
#include "EXPComponent.h"
|
||||||
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
AWeapon::AWeapon()
|
AWeapon::AWeapon()
|
||||||
@ -28,7 +29,12 @@ void AWeapon::ResetWeaponTimer()
|
|||||||
|
|
||||||
void AWeapon::FireWeaponAction_Implementation()
|
void AWeapon::FireWeaponAction_Implementation()
|
||||||
{
|
{
|
||||||
// This should be overridden in child weapon classes
|
// This should be overridden in child weapon classes
|
||||||
|
|
||||||
|
if (WeaponActivatedSoundBase)
|
||||||
|
{
|
||||||
|
UGameplayStatics::PlaySound2D(GetWorld(), WeaponActivatedSoundBase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AWeapon::UpgradeWeapon_Implementation()
|
bool AWeapon::UpgradeWeapon_Implementation()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user