added temp scene and wave based enemy
This commit is contained in:
@@ -16,6 +16,7 @@ namespace Darkmatter.Domain
|
||||
[Inject] public readonly IReloadableWeapon currentWeapon;
|
||||
[Inject] public readonly PlayerConfigSO playerConfig;
|
||||
[Inject] public readonly CameraConfigSO cameraConfig;
|
||||
[Inject] public readonly IAudioService audioService;
|
||||
|
||||
private Vector3 moveDir;
|
||||
private float Yaw;
|
||||
@@ -56,18 +57,21 @@ namespace Darkmatter.Domain
|
||||
if (!isShooting) return;
|
||||
if(currentWeapon.canAttack)
|
||||
{
|
||||
audioService.PlaySFX(AudioId.Gun_Fire,0.1f);
|
||||
currentWeapon.Attack();
|
||||
}
|
||||
if (currentWeapon.AmmoCount == 0)
|
||||
if (currentWeapon.AmmoCount == 0 && !currentWeapon.isReloading)
|
||||
{
|
||||
audioService.PlaySFX(AudioId.Gun_Reload, 0.1f);
|
||||
playerAnim.PlayReloadAnim(currentWeapon);
|
||||
}
|
||||
}
|
||||
|
||||
public void Reload()
|
||||
{
|
||||
if(currentWeapon.AmmoCount<currentWeapon.initialAmmoCount)
|
||||
if(currentWeapon.AmmoCount<currentWeapon.initialAmmoCount && !currentWeapon.isReloading)
|
||||
{
|
||||
audioService.PlaySFX(AudioId.Gun_Reload, 0.1f);
|
||||
playerAnim.PlayReloadAnim(currentWeapon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user