Zvuky, změny v pathfindingu, přidány ventilace
This commit is contained in:
parent
4fdff0a0cc
commit
c5adebb2db
36 changed files with 527 additions and 143 deletions
|
|
@ -37,7 +37,7 @@ public class Client {
|
|||
public static ClientPlayer Opponent { get; } = new();
|
||||
|
||||
public static ClientPlayer GetPlayer(int pid) => Player.state.pid == pid ? Player : Opponent;
|
||||
|
||||
|
||||
public static void Connect(string endPoint, int port) {
|
||||
State = ConnectionState.CONNECTING;
|
||||
writer = new NetDataWriter();
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public class CommandManager {
|
|||
Client.Player.state.monitorUp = !Client.Player.state.monitorUp;
|
||||
UIManager.ChangeMonitorState(Client.Player.state.monitorUp);
|
||||
Client.SendCommands([PlayerCommand.SET_MONITOR(Client.Player.state.monitorUp)]);
|
||||
SoundManager.PlayMonitorFlip();
|
||||
}
|
||||
|
||||
private static void ToggleDoorLeft() => SendToggleDoor(Direction.EAST);
|
||||
|
|
@ -54,6 +55,7 @@ public class CommandManager {
|
|||
if (direction == Direction.SOUTH) return;
|
||||
Client.Player.state.doorStates[(int)direction] = !Client.Player.state.doorStates[(int)direction];
|
||||
UIManager.ChangeDoorState(direction, Client.Player.state.doorStates[(int)direction]);
|
||||
SoundManager.PlayDoor(Client.Player.state.doorStates[(int)direction]);
|
||||
Client.SendCommands([PlayerCommand.SET_DOOR_OFFICE(direction, Client.Player.state.doorStates[(int)direction])]);
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +65,7 @@ public class CommandManager {
|
|||
|
||||
connector.Blocked = !connector.Blocked;
|
||||
Client.SendCommands([PlayerCommand.SET_DOOR_REMOTE(connector.Id, connector.Blocked)]);
|
||||
SoundManager.PlayDoorRemote(connector.Blocked);
|
||||
UIManager.ChangeRemoteDoorState(connector.Id, connector.Blocked);
|
||||
// Console.WriteLine("Changed door state to: " + (connector.Blocked ? "blocked" : "open") + " for door " + connector);
|
||||
// add UIManager toggle door
|
||||
|
|
@ -73,6 +76,7 @@ public class CommandManager {
|
|||
|
||||
Client.Player.state.camera = id;
|
||||
UIManager.ChangeCamera(id);
|
||||
SoundManager.PlayCameraSwitch();
|
||||
Client.SendCommands([PlayerCommand.SWITCH_CAM(id)]);
|
||||
MapTileProjection tile = ClientMapManager.Get(id);
|
||||
// add UIManager switch camera
|
||||
|
|
@ -88,6 +92,7 @@ public class CommandManager {
|
|||
if(!Client.Player.state.monitorUp || ClientMapManager.Get(id).Owner != Client.Player) return;
|
||||
ClientMapManager.Get(id).Lit = state;
|
||||
UIManager.UpdateCameras([id]);
|
||||
SoundManager.PlayLight(state);
|
||||
Client.SendCommands([PlayerCommand.SET_LIGHT(id, state)]);
|
||||
}
|
||||
}
|
||||
|
|
@ -95,3 +95,123 @@
|
|||
/processorParam:TextureFormat=Compressed
|
||||
/build:ponderosa.spritefont
|
||||
|
||||
#begin sounds/ambience.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/ambience.wav
|
||||
|
||||
#begin sounds/camera-switch.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/camera-switch.wav
|
||||
|
||||
#begin sounds/dash-move.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/dash-move.wav
|
||||
|
||||
#begin sounds/dash-sounds-raw.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/dash-sounds-raw.wav
|
||||
|
||||
#begin sounds/door-close-remote.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/door-close-remote.wav
|
||||
|
||||
#begin sounds/door-close.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/door-close.wav
|
||||
|
||||
#begin sounds/door-open-remote.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/door-open-remote.wav
|
||||
|
||||
#begin sounds/door-open.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/door-open.wav
|
||||
|
||||
#begin sounds/jumpscare.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/jumpscare.wav
|
||||
|
||||
#begin sounds/light-off.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/light-off.wav
|
||||
|
||||
#begin sounds/light-on.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/light-on.wav
|
||||
|
||||
#begin sounds/mare-move.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/mare-move.wav
|
||||
|
||||
#begin sounds/monitor-flip.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/monitor-flip.wav
|
||||
|
||||
#begin sounds/neko-angry.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/neko-angry.wav
|
||||
|
||||
#begin sounds/neko-move1.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/neko-move1.wav
|
||||
|
||||
#begin sounds/neko-purr.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/neko-purr.wav
|
||||
|
||||
#begin sounds/powerout.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/powerout.wav
|
||||
|
||||
#begin sounds/spot-activate.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/spot-activate.wav
|
||||
|
||||
#begin sounds/spot-move.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/spot-move.wav
|
||||
|
||||
#begin sounds/vent-walk.wav
|
||||
/importer:WavImporter
|
||||
/processor:SoundEffectProcessor
|
||||
/processorParam:Quality=Best
|
||||
/build:sounds/vent-walk.wav
|
||||
|
||||
|
|
|
|||
BIN
FNAF_Clone/Content/sounds/ambience.wav
Normal file
BIN
FNAF_Clone/Content/sounds/ambience.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/camera-switch.wav
Normal file
BIN
FNAF_Clone/Content/sounds/camera-switch.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/dash-move.wav
Normal file
BIN
FNAF_Clone/Content/sounds/dash-move.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/dash-sounds-raw.wav
Normal file
BIN
FNAF_Clone/Content/sounds/dash-sounds-raw.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/door-close-remote.wav
Normal file
BIN
FNAF_Clone/Content/sounds/door-close-remote.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/door-close.wav
Normal file
BIN
FNAF_Clone/Content/sounds/door-close.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/door-open-remote.wav
Normal file
BIN
FNAF_Clone/Content/sounds/door-open-remote.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/door-open.wav
Normal file
BIN
FNAF_Clone/Content/sounds/door-open.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/jumpscare.wav
Normal file
BIN
FNAF_Clone/Content/sounds/jumpscare.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/light-off.wav
Normal file
BIN
FNAF_Clone/Content/sounds/light-off.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/light-on.wav
Normal file
BIN
FNAF_Clone/Content/sounds/light-on.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/mare-move.wav
Normal file
BIN
FNAF_Clone/Content/sounds/mare-move.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/monitor-flip.wav
Normal file
BIN
FNAF_Clone/Content/sounds/monitor-flip.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/neko-angry.wav
Normal file
BIN
FNAF_Clone/Content/sounds/neko-angry.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/neko-move1.wav
Normal file
BIN
FNAF_Clone/Content/sounds/neko-move1.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/neko-purr.wav
Normal file
BIN
FNAF_Clone/Content/sounds/neko-purr.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/powerout.wav
Normal file
BIN
FNAF_Clone/Content/sounds/powerout.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/spot-activate.wav
Normal file
BIN
FNAF_Clone/Content/sounds/spot-activate.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/spot-move.wav
Normal file
BIN
FNAF_Clone/Content/sounds/spot-move.wav
Normal file
Binary file not shown.
BIN
FNAF_Clone/Content/sounds/vent-walk.wav
Normal file
BIN
FNAF_Clone/Content/sounds/vent-walk.wav
Normal file
Binary file not shown.
|
|
@ -77,25 +77,29 @@ public class EventProcessor {
|
|||
int oldPos = ClientEnemyManager.Get(e.Args[0]).Location!.Id;
|
||||
ClientEnemyManager.Move(e.Args[0], ClientMapManager.Get(e.Args[1]));
|
||||
UIManager.UpdateCameras([oldPos, e.Args[1]]);
|
||||
SoundManager.PlayEnemyMove(ClientEnemyManager.Get(e.Args[0]));
|
||||
break;
|
||||
|
||||
case 8: // attack
|
||||
Console.WriteLine($"E: Enemy {e.Args[0]} attacked player {e.Args[1]}"); // TODO: add an arg to indicate lethality
|
||||
if (e.Args[1] == Client.Player.state.pid) {
|
||||
UIManager.Jumpscare(ClientEnemyManager.Get(e.Args[0]));
|
||||
SoundManager.PlayJumpscare();
|
||||
}
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case 9: // reset
|
||||
Console.WriteLine($"E: Enemy {e.Args[0]} reset to {e.Args[1]}");
|
||||
int preResetPos = ClientEnemyManager.Get(e.Args[0]).Location!.Id;
|
||||
ClientEnemyManager.Move(e.Args[0], ClientMapManager.Get(e.Args[1]));
|
||||
UIManager.UpdateCameras([preResetPos, e.Args[1]]);
|
||||
SoundManager.PlayEnemyReset(ClientEnemyManager.Get(e.Args[0]));
|
||||
break;
|
||||
|
||||
case 10:
|
||||
Console.WriteLine($"E: Spot:{e.Args[0]} turned {(e.Args[1] == 1 ? "on" : " off")}");
|
||||
ClientEnemyManager.Get(e.Args[0]).Sprite.SetTexture(e.Args[1] == 1 ? 0 : 1);
|
||||
SoundManager.PlaySpotActivate();
|
||||
break;
|
||||
|
||||
case 11:
|
||||
|
|
@ -103,10 +107,11 @@ public class EventProcessor {
|
|||
if(Client.Player.state.pid == e.Args[0]) UIManager.ShowVictoryScreen();
|
||||
break;
|
||||
|
||||
case 12:
|
||||
case 12: // game start
|
||||
Console.WriteLine("E: Game started");
|
||||
UIManager.DisplayGameUI();
|
||||
UIManager.StartTimer();
|
||||
SoundManager.StartAmbience();
|
||||
break;
|
||||
|
||||
case 13:
|
||||
|
|
@ -140,6 +145,7 @@ public class EventProcessor {
|
|||
UIManager.ChangeDoorState(Direction.WEST, false);
|
||||
CommandManager.AllowGameControls(false);
|
||||
UIManager.ChangeMonitorState(false);
|
||||
SoundManager.PlayPowerOut();
|
||||
}
|
||||
else{
|
||||
UIManager.ChangeDoorStateOpponent(Direction.EAST, false);
|
||||
|
|
@ -159,8 +165,17 @@ public class EventProcessor {
|
|||
}
|
||||
|
||||
ClientMapManager.Get(e.Args[1]).Lit = lightState;
|
||||
UIManager.UpdateCameras([e.Args[1]]);
|
||||
break;
|
||||
|
||||
|
||||
case 16: // neko anger
|
||||
SoundManager.PlayNekoAnger();
|
||||
break;
|
||||
|
||||
case 17:
|
||||
SoundManager.PlayVentWalk();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public class UIManager {
|
|||
|
||||
private static InputListenerHook monitorSwitchHook;
|
||||
|
||||
private static bool fullBright = false; // Debug
|
||||
|
||||
public static void LoadAssets() {
|
||||
testAtlas = TextureAtlas.FromFile(Core.content, "images/testBlocks-definition.xml");
|
||||
OfficeAtlas = TextureAtlas.FromFile(Core.content, "images/office-definition.xml");
|
||||
|
|
@ -202,7 +204,7 @@ public class UIManager {
|
|||
int stateInt = state ? 1 : 0;
|
||||
|
||||
switch ((int)dir){
|
||||
case 0:
|
||||
case 0:
|
||||
officeScreen["office_left"].SetTexture(stateInt);
|
||||
monitorScreen["p1-office-door-left"].SetTexture(stateInt);
|
||||
break;
|
||||
|
|
@ -214,7 +216,7 @@ public class UIManager {
|
|||
officeScreen["office_right"].SetTexture(stateInt);
|
||||
monitorScreen["p1-office-door-right"].SetTexture(stateInt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChangeDoorStateOpponent(Direction dir, bool state) { // TODO: overload to avoid excessive casting
|
||||
|
|
@ -239,6 +241,7 @@ public class UIManager {
|
|||
|
||||
public static void ChangeMonitorState(bool state) {
|
||||
Screen.SetScreen(state ? ScreenTypes.CAMERAS : ScreenTypes.OFFICE);
|
||||
UpdateCameras([Client.Player.state.camera]);
|
||||
}
|
||||
|
||||
public static void ChangeMonitorStateOpponent(bool state) {
|
||||
|
|
@ -259,7 +262,7 @@ public class UIManager {
|
|||
}
|
||||
|
||||
if (camIds.Contains(Client.Player.state.camera)){
|
||||
bool lit = ClientMapManager.Get(Client.Player.state.camera).Lit;
|
||||
bool lit = ClientMapManager.Get(Client.Player.state.camera).Lit || fullBright;
|
||||
cameraView.Visible = lit;
|
||||
enemyElements.Values.Where(e => e.Visible).ToList().ForEach(e => e.Visible = false);
|
||||
ClientEnemy[] enemies = ClientEnemyManager.GetByLocation(ClientMapManager.Get(Client.Player.state.camera));
|
||||
|
|
@ -270,6 +273,13 @@ public class UIManager {
|
|||
enemyElement.Visible = true;
|
||||
enemyElement.SetTexture(lit);
|
||||
}
|
||||
|
||||
if (!lit && Client.Player.state.monitorUp && enemies.Any(e => e.TypeId == (int)EnemyType.NEKO)){
|
||||
SoundManager.StartNekoPurr();
|
||||
}
|
||||
else{
|
||||
SoundManager.StopNekoPurr();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -293,6 +303,7 @@ public class UIManager {
|
|||
Screen.SetScreen(ScreenTypes.WIN);
|
||||
Screen.DisableOverlay();
|
||||
CommandManager.AllowGameControls(false);
|
||||
SoundManager.StopAmbience();
|
||||
InputManager.AddListener(Keys.Space, DisplayMainMenu, InputTiming.PRESS, new InputListenerHook(true, true));
|
||||
}
|
||||
|
||||
|
|
@ -300,6 +311,7 @@ public class UIManager {
|
|||
Screen.SetScreen(ScreenTypes.LOSE);
|
||||
Screen.DisableOverlay();
|
||||
CommandManager.AllowGameControls(false);
|
||||
SoundManager.StopAmbience();
|
||||
InputManager.AddListener(Keys.Space, DisplayMainMenu, InputTiming.PRESS, new InputListenerHook(true, true));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
|
|||
|
||||
protected override void LoadContent() {
|
||||
UIManager.LoadAssets();
|
||||
SoundManager.LoadSounds();
|
||||
// spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
// font = Content.Load<SpriteFont>("font");
|
||||
}
|
||||
|
|
|
|||
164
FNAF_Clone/SoundManager.cs
Normal file
164
FNAF_Clone/SoundManager.cs
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
using System;
|
||||
using GlobalClassLib;
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using MonoGameLibrary;
|
||||
|
||||
namespace FNAF_Clone;
|
||||
|
||||
public static class SoundManager {
|
||||
private static SoundEffect ambience;
|
||||
private static SoundEffect ventWalk;
|
||||
private static SoundEffect camSwitch;
|
||||
private static SoundEffect lightOff;
|
||||
private static SoundEffect lightOn;
|
||||
private static SoundEffect doorClose;
|
||||
private static SoundEffect doorCloseRemote;
|
||||
private static SoundEffect doorOpen;
|
||||
private static SoundEffect doorOpenRemote;
|
||||
private static SoundEffect monitorFlip;
|
||||
private static SoundEffect powerOut;
|
||||
private static SoundEffect mareMove;
|
||||
private static SoundEffect dashMove;
|
||||
private static SoundEffect spotMove;
|
||||
private static SoundEffect spotActivate;
|
||||
private static SoundEffect nekoPurr;
|
||||
private static SoundEffect jumpscare;
|
||||
private static SoundEffect nekoAnger;
|
||||
private static SoundEffect nekoMove;
|
||||
|
||||
private static SoundEffectInstance ambienceInstance;
|
||||
private static SoundEffectInstance nekoPurrInstance;
|
||||
|
||||
private static Random random = new();
|
||||
|
||||
public static void LoadSounds() {
|
||||
ambience = Core.content.Load<SoundEffect>("sounds/ambience");
|
||||
ventWalk = Core.content.Load<SoundEffect>("sounds/vent-walk");
|
||||
camSwitch = Core.content.Load<SoundEffect>("sounds/camera-switch");
|
||||
lightOff = Core.content.Load<SoundEffect>("sounds/light-off");
|
||||
lightOn = Core.content.Load<SoundEffect>("sounds/light-on");
|
||||
doorClose = Core.content.Load<SoundEffect>("sounds/door-close");
|
||||
doorCloseRemote = Core.content.Load<SoundEffect>("sounds/door-close-remote");
|
||||
doorOpen = Core.content.Load<SoundEffect>("sounds/door-open");
|
||||
doorOpenRemote = Core.content.Load<SoundEffect>("sounds/door-open-remote");
|
||||
monitorFlip = Core.content.Load<SoundEffect>("sounds/monitor-flip");
|
||||
powerOut = Core.content.Load<SoundEffect>("sounds/powerout");
|
||||
mareMove = Core.content.Load<SoundEffect>("sounds/mare-move");
|
||||
dashMove = Core.content.Load<SoundEffect>("sounds/dash-move");
|
||||
spotMove = Core.content.Load<SoundEffect>("sounds/spot-move");
|
||||
spotActivate = Core.content.Load<SoundEffect>("sounds/spot-activate");
|
||||
nekoPurr = Core.content.Load<SoundEffect>("sounds/neko-purr");
|
||||
jumpscare = Core.content.Load<SoundEffect>("sounds/jumpscare");
|
||||
nekoAnger = Core.content.Load<SoundEffect>("sounds/neko-angry");
|
||||
nekoMove = Core.content.Load<SoundEffect>("sounds/neko-move1");
|
||||
|
||||
nekoPurrInstance = nekoPurr.CreateInstance();
|
||||
ambienceInstance = ambience.CreateInstance();
|
||||
}
|
||||
|
||||
public static void StartAmbience() {
|
||||
ambienceInstance = ambience.CreateInstance();
|
||||
ambienceInstance.IsLooped = true;
|
||||
ambienceInstance.Volume = 0.75f;
|
||||
ambienceInstance.Play();
|
||||
}
|
||||
public static void StopAmbience() {
|
||||
ambienceInstance.Stop();
|
||||
}
|
||||
|
||||
public static void PlayDoor(bool doorState) {
|
||||
if (doorState){
|
||||
doorClose.Play();
|
||||
}
|
||||
else{
|
||||
doorOpen.Play();
|
||||
}
|
||||
}
|
||||
public static void PlayDoorRemote(bool doorState) {
|
||||
if (doorState){
|
||||
doorCloseRemote.Play();
|
||||
}
|
||||
else{
|
||||
doorOpenRemote.Play();
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayLight(bool lightState) {
|
||||
if (lightState){
|
||||
lightOn.Play();
|
||||
}
|
||||
else{
|
||||
lightOff.Play();
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayJumpscare() => jumpscare.Play();
|
||||
|
||||
public static void PlayPowerOut() => powerOut.Play();
|
||||
|
||||
public static void PlayNekoMove() => nekoMove.Play();
|
||||
|
||||
public static void PlayNekoAnger() => nekoAnger.Play();
|
||||
|
||||
public static void PlaySpotActivate() => spotActivate.Play();
|
||||
|
||||
public static void PlaySpotMove() => spotMove.Play();
|
||||
|
||||
public static void PlayDashMove() => dashMove.Play();
|
||||
|
||||
public static void PlayMareMove() => mareMove.Play();
|
||||
|
||||
public static void PlayMonitorFlip() => monitorFlip.Play();
|
||||
|
||||
public static void PlayCameraSwitch() => camSwitch.Play();
|
||||
|
||||
public static void PlayVentWalk() => ventWalk.Play();
|
||||
|
||||
public static void StartNekoPurr() {
|
||||
nekoPurrInstance = nekoPurr.CreateInstance();
|
||||
nekoPurrInstance.IsLooped = true;
|
||||
nekoPurrInstance.Play();
|
||||
}
|
||||
|
||||
public static void StopNekoPurr() {
|
||||
nekoPurrInstance.Stop();
|
||||
}
|
||||
|
||||
private static SoundEffectInstance GetRandomisedPitchInstance(SoundEffect effect) {
|
||||
SoundEffectInstance instance = effect.CreateInstance();
|
||||
instance.Pitch = (float)(random.NextDouble() - 0.5) / 5;
|
||||
instance.Play();
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static void PlayEnemyMove(ClientEnemy enemy) {
|
||||
switch ((EnemyType)enemy.TypeId){
|
||||
case EnemyType.NEKO:
|
||||
PlayNekoMove();
|
||||
break;
|
||||
case EnemyType.SPOT:
|
||||
PlaySpotMove();
|
||||
break;
|
||||
case EnemyType.MARE:
|
||||
PlayMareMove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static void PlayEnemyReset(ClientEnemy enemy) {
|
||||
switch ((EnemyType)enemy.TypeId){
|
||||
case EnemyType.NEKO:
|
||||
PlayNekoMove();
|
||||
break;
|
||||
case EnemyType.SPOT:
|
||||
PlaySpotMove();
|
||||
break;
|
||||
case EnemyType.MARE:
|
||||
PlayMareMove();
|
||||
break;
|
||||
case EnemyType.DASH:
|
||||
PlayDashMove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue