added temp scene and wave based enemy

This commit is contained in:
Mausham
2026-01-01 17:48:58 -08:00
parent eeea619790
commit 15a7bed129
623 changed files with 15683 additions and 1206 deletions

View File

@@ -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);
}