Merge pull request #64 from progtime-net/FixingDevelopment
Fixing development
This commit is contained in:
commit
0ea1f44072
3 changed files with 15 additions and 7 deletions
|
@ -108,7 +108,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return IPAddress.Loopback;
|
return IPAddress.Loopback;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//поток 2
|
//поток 2
|
||||||
|
|
|
@ -62,7 +62,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return IPAddress.Loopback;
|
return IPAddress.Loopback;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -8,8 +8,9 @@ using Microsoft.Xna.Framework.Content;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Microsoft.Xna.Framework.Media;
|
using Microsoft.Xna.Framework.Media;
|
||||||
using ZoFo.GameCore.GUI;
|
using System.Runtime.InteropServices;
|
||||||
|
using ZoFo.GameCore.GUI;
|
||||||
|
|
||||||
namespace ZoFo.GameCore.GameManagers
|
namespace ZoFo.GameCore.GameManagers
|
||||||
{
|
{
|
||||||
|
@ -21,9 +22,18 @@ namespace ZoFo.GameCore.GameManagers
|
||||||
|
|
||||||
public void LoadSounds() // метод для загрузки звуков из папки
|
public void LoadSounds() // метод для загрузки звуков из папки
|
||||||
{
|
{
|
||||||
//List<string> sounds = AppManager.Instance.Content.Load<List<string>>("sounds/");
|
//List<string> sounds = AppManager.Instance.Content.Load<List<string>>("sounds/");
|
||||||
var k = Directory.GetFiles(Path.Combine(AppContext.BaseDirectory, "Content", "sounds")).Where(x => x.EndsWith("xnb"));
|
|
||||||
if (k.Count() > 0)
|
string a = Path.Combine("Content", "sounds");
|
||||||
|
string[] k;
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
|
{
|
||||||
|
k = Directory.GetFiles(Path.Combine("bin", "Debug", "net8.0", "Content", "sounds")).Where(x => x.EndsWith("xnb")).ToArray();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
k = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "Content", "sounds")).Where(x => x.EndsWith("xnb")).ToArray();
|
||||||
|
}
|
||||||
|
if (k.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
string[] soundFiles = k.Select(x => x.Split("\\").Last().Split("/").Last().Replace(".xnb", "")).ToArray();// папка со звуками там где exe
|
string[] soundFiles = k.Select(x => x.Split("\\").Last().Split("/").Last().Replace(".xnb", "")).ToArray();// папка со звуками там где exe
|
||||||
|
|
Loading…
Add table
Reference in a new issue