Správné vypnutí serveru v případě crashe z důvodu obsazeného portu, soubor na nastavení rozlišení, odstranění nepoužívané metody Enemy.SilentSpawn a implementace metody SoundManager.GetRandomisedPitchInstance
This commit is contained in:
parent
243f071a43
commit
8742f9eb55
10 changed files with 46 additions and 56 deletions
|
|
@ -71,27 +71,27 @@ public static class SoundManager {
|
|||
|
||||
public static void PlayDoor(bool doorState) {
|
||||
if (doorState){
|
||||
doorClose.Play();
|
||||
GetRandomisedPitchInstance(doorClose).Play();
|
||||
}
|
||||
else{
|
||||
doorOpen.Play();
|
||||
GetRandomisedPitchInstance(doorOpen).Play();
|
||||
}
|
||||
}
|
||||
public static void PlayDoorRemote(bool doorState) {
|
||||
if (doorState){
|
||||
doorCloseRemote.Play();
|
||||
GetRandomisedPitchInstance(doorCloseRemote).Play();
|
||||
}
|
||||
else{
|
||||
doorOpenRemote.Play();
|
||||
GetRandomisedPitchInstance(doorOpenRemote).Play();
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayLight(bool lightState) {
|
||||
if (lightState){
|
||||
lightOn.Play();
|
||||
GetRandomisedPitchInstance(lightOn).Play();
|
||||
}
|
||||
else{
|
||||
lightOff.Play();
|
||||
GetRandomisedPitchInstance(lightOff).Play();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -99,23 +99,23 @@ public static class SoundManager {
|
|||
|
||||
public static void PlayPowerOut() => powerOut.Play();
|
||||
|
||||
public static void PlayNekoMove() => nekoMove.Play();
|
||||
public static void PlayNekoMove() => GetRandomisedPitchInstance(nekoMove).Play();
|
||||
|
||||
public static void PlayNekoAnger() => nekoAnger.Play();
|
||||
|
||||
public static void PlaySpotActivate() => spotActivate.Play();
|
||||
public static void PlaySpotActivate() => GetRandomisedPitchInstance(spotActivate).Play();
|
||||
|
||||
public static void PlaySpotMove() => spotMove.Play();
|
||||
public static void PlaySpotMove() => GetRandomisedPitchInstance(spotMove).Play();
|
||||
|
||||
public static void PlayDashMove() => dashMove.Play();
|
||||
public static void PlayDashMove() => GetRandomisedPitchInstance(dashMove).Play();
|
||||
|
||||
public static void PlayMareMove() => mareMove.Play();
|
||||
public static void PlayMareMove() => GetRandomisedPitchInstance(mareMove).Play();
|
||||
|
||||
public static void PlayMonitorFlip() => monitorFlip.Play();
|
||||
public static void PlayMonitorFlip() => GetRandomisedPitchInstance(monitorFlip).Play();
|
||||
|
||||
public static void PlayCameraSwitch() => camSwitch.Play();
|
||||
public static void PlayCameraSwitch() => GetRandomisedPitchInstance(camSwitch).Play();
|
||||
|
||||
public static void PlayVentWalk() => ventWalk.Play();
|
||||
public static void PlayVentWalk() => GetRandomisedPitchInstance(ventWalk).Play();
|
||||
|
||||
public static void PlayBell() => bell.Play();
|
||||
|
||||
|
|
@ -126,10 +126,9 @@ public static class SoundManager {
|
|||
}
|
||||
|
||||
public static void StopNekoPurr() {
|
||||
nekoPurrInstance.Stop();
|
||||
nekoPurrInstance?.Stop();
|
||||
}
|
||||
|
||||
// unused
|
||||
|
||||
private static SoundEffectInstance GetRandomisedPitchInstance(SoundEffect effect) {
|
||||
SoundEffectInstance instance = effect.CreateInstance();
|
||||
instance.Pitch = (float)(random.NextDouble() - 0.5) / 5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue