Implemented muzzle flash activation on revolver fire
This commit is contained in:
parent
46e087b3de
commit
0a0b43da16
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/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Revolver/VFX_MuzzleFlash/NS_MuzzleFlash.uasset
(Stored with Git LFS)
Binary file not shown.
@ -46,6 +46,7 @@ void ALMRevolver::PrimaryFire()
|
|||||||
FLMBulletInfo ShotInfo = FLMBulletInfo(1, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage);
|
FLMBulletInfo ShotInfo = FLMBulletInfo(1, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage);
|
||||||
|
|
||||||
Player->FireBullets(ShotInfo);
|
Player->FireBullets(ShotInfo);
|
||||||
|
OnFire();
|
||||||
GetWorldTimerManager().SetTimer(FireTimer, this, &ALMRevolver::AllowRefire, RefireDelay);
|
GetWorldTimerManager().SetTimer(FireTimer, this, &ALMRevolver::AllowRefire, RefireDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ void ALMShotgun::PrimaryFire()
|
|||||||
FLMBulletInfo ShotInfo = FLMBulletInfo(PelletCount, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage);
|
FLMBulletInfo ShotInfo = FLMBulletInfo(PelletCount, Origin, Direction, WeaponSpread, MaxDistance, DamageFalloff, AmmoType, Damage);
|
||||||
|
|
||||||
Player->FireBullets(ShotInfo);
|
Player->FireBullets(ShotInfo);
|
||||||
|
OnFire();
|
||||||
GetWorldTimerManager().SetTimer(FireTimer, this, &ALMShotgun::AllowRefire, RefireDelay);
|
GetWorldTimerManager().SetTimer(FireTimer, this, &ALMShotgun::AllowRefire, RefireDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,9 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
|
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
|
||||||
void OnDefaultReload();
|
void OnDefaultReload();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||||
|
void OnFire();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void AllowRefire();
|
void AllowRefire();
|
||||||
|
Reference in New Issue
Block a user