Merge branch 'MapDevelopment' of https://github.com/progtime-net/ZoFo into MapDevelopment
This commit is contained in:
commit
46c28524c7
2 changed files with 15 additions and 6 deletions
|
@ -109,7 +109,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return IPAddress.Loopback;
|
return IPAddress.Loopback;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//поток 2
|
//поток 2
|
||||||
|
|
|
@ -9,6 +9,7 @@ using System.Linq;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Microsoft.Xna.Framework.Media;
|
using Microsoft.Xna.Framework.Media;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using ZoFo.GameCore.GUI;
|
using ZoFo.GameCore.GUI;
|
||||||
|
|
||||||
namespace ZoFo.GameCore.GameManagers
|
namespace ZoFo.GameCore.GameManagers
|
||||||
|
@ -22,8 +23,17 @@ 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