Basic gamepad with force feedback impl

This commit is contained in:
2021-04-24 02:47:17 +02:00
parent db9c3cceea
commit 9f66f9d8fb
109 changed files with 205 additions and 196 deletions
+4 -2
View File
@@ -25,7 +25,7 @@ namespace EvilSatellites.Weapons
Screen = screen;
MaxAmmo = 250;
RemainingAmmo = MaxAmmo;
FireRate = 90;
FireRate = 150;
State = WeaponState.Stopped;
LoadSounds();
}
@@ -37,7 +37,7 @@ namespace EvilSatellites.Weapons
sfxSpinup = Screen.Manager.Sound.Load(@"sfx/weapons/LaserMG/spinup.wav", false);
sfxSpinning = Screen.Manager.Sound.Load(@"sfx/weapons/LaserMG/spinning.wav", false);
sfxSpinning.Loop = true;
sfxShoot = new AudioAsset(Screen.Manager.Sound, @"sfx/weapons/LaserMG/fire", 1, 4);
sfxShoot = new AudioAsset(Screen.Manager.Sound, @"sfx/weapons/LaserMG/fire", 1, 5);
sfxEmpty = Screen.Manager.Sound.Load(@"sfx/weapons/LaserMG/empty.wav", false);
sfxEmpty.ConnectToEffect(Screen.Manager.EnvironmentEffect);
sfxReload.ConnectToEffect(Screen.Manager.EnvironmentEffect);
@@ -90,6 +90,7 @@ namespace EvilSatellites.Weapons
if (RemainingAmmo > 0)
{
sfxShoot.Play();
Screen.Manager.Vibrations.AddVibration(1, 1, 100);
RemainingAmmo--;
TimerStart = TimerEnd;
Projectile proj = new Projectile(Screen, _wielder.Position, _wielder.Rotation, _wielder);
@@ -119,6 +120,7 @@ namespace EvilSatellites.Weapons
RemainingAmmo += amount;
sfxReload.Reset();
sfxReload.Play();
Screen.Manager.Vibrations.AddVibration(1, 1, 500);
}
}
}