Implemented weapon switch feedback
This commit is contained in:
parent
d12dbb7c82
commit
954ae7c36d
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/BP_Revolver.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Weapon/WeaponSwitchPlaceholder.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -40,6 +40,11 @@ void ALMWeaponBase::Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner)
|
||||
Player = Cast<ALMPlayer>(CharOwner);
|
||||
}
|
||||
|
||||
void ALMWeaponBase::OnEquip_Implementation()
|
||||
{
|
||||
PlaySound(EquipSound);
|
||||
}
|
||||
|
||||
bool ALMWeaponBase::Reload()
|
||||
{
|
||||
return DefaultReload();
|
||||
|
@ -161,5 +161,7 @@ void ULMWeaponManager::SetWeapon(const int Index)
|
||||
GetCurrentWeapon()->SetActorHiddenInGame(true);
|
||||
CurrentWeaponIndex = Index;
|
||||
GetCurrentWeapon()->SetActorHiddenInGame(false);
|
||||
|
||||
GetCurrentWeapon()->OnEquip();
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,10 @@ public:
|
||||
void Setup(USkeletalMeshComponent* Mesh, AActor* CharOwner);
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category=Legumix)
|
||||
void OnEquip();
|
||||
virtual void OnEquip_Implementation();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
virtual bool Reload();
|
||||
|
||||
@ -67,6 +71,9 @@ protected: /* Weapon Data */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||
TObjectPtr<USoundWave> DryFireSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Legumix|Sounds")
|
||||
TObjectPtr<USoundWave> EquipSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Legumix|Animations", meta=(AllowPrivateAccess=true))
|
||||
TObjectPtr<UAnimMontage> PrimaryFireAnimation;
|
||||
|
||||
|
Reference in New Issue
Block a user