NetworkFix
This commit is contained in:
parent
c87b8d9089
commit
ccc6937ac9
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ namespace DangerousD.GameCore
|
||||||
private GraphicsDeviceManager _graphics;
|
private GraphicsDeviceManager _graphics;
|
||||||
private SpriteBatch _spriteBatch;
|
private SpriteBatch _spriteBatch;
|
||||||
public GameState gameState { get; private set; }
|
public GameState gameState { get; private set; }
|
||||||
public MultiPlayerStatus multiPlayerStatus { get; private set; }
|
public MultiPlayerStatus multiPlayerStatus { get; private set; } = MultiPlayerStatus.SinglePlayer;
|
||||||
IDrawableObject MenuGUI;
|
IDrawableObject MenuGUI;
|
||||||
IDrawableObject OptionsGUI;
|
IDrawableObject OptionsGUI;
|
||||||
IDrawableObject LoginGUI;
|
IDrawableObject LoginGUI;
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace DangerousD.GameCore
|
||||||
sound.SoundEffect.IsLooped = false;
|
sound.SoundEffect.IsLooped = false;
|
||||||
sound.SoundEffect.Play();
|
sound.SoundEffect.Play();
|
||||||
PlayingSounds.Add(sound);
|
PlayingSounds.Add(sound);
|
||||||
if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.Host)
|
if (AppManager.Instance.multiPlayerStatus == MultiPlayerStatus.Host)
|
||||||
{
|
{
|
||||||
AppManager.Instance.NetworkManager.SendMsg(new Network.NetworkTask(Vector2.Zero, soundName));
|
AppManager.Instance.NetworkManager.SendMsg(new Network.NetworkTask(Vector2.Zero, soundName));
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ namespace DangerousD.GameCore
|
||||||
sound.SoundEffect.Volume = (float)sound.GetDistance(playerPos) / MaxSoundDistance;
|
sound.SoundEffect.Volume = (float)sound.GetDistance(playerPos) / MaxSoundDistance;
|
||||||
sound.SoundEffect.Play();
|
sound.SoundEffect.Play();
|
||||||
PlayingSounds.Add(sound);
|
PlayingSounds.Add(sound);
|
||||||
if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.Host)
|
if (AppManager.Instance.multiPlayerStatus == MultiPlayerStatus.Host)
|
||||||
{
|
{
|
||||||
AppManager.Instance.NetworkManager.SendMsg(new Network.NetworkTask(soundPos, soundName));
|
AppManager.Instance.NetworkManager.SendMsg(new Network.NetworkTask(soundPos, soundName));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue