DespairCommit

This commit is contained in:
AnloGames 2024-09-07 12:48:46 +03:00
parent 4856e751cc
commit ad3d2a7a08
32 changed files with 949 additions and 1 deletions

2
ServerOverall/Program.cs Normal file
View file

@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

View file

@ -0,0 +1,296 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using ServerOverall.Server.Updates.ServerToClient;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using ServerOverall.Server.Updates.ClientToServer;
using ServerOverall.Server.Updates;
using System.Xml.Linq;
/*namespace ServerOverall.Server
{
public class ServerNetworkManager
{
private Socket socket;
private IPAddress ip;
private bool isMultiplayer;
//Player Id to Player endPoint
public List<IPEndPoint> clientsEP;
public IPEndPoint endPoint;
private List<UpdateData> commonUpdates;
private List<UpdateData> importantUpdates;
private List<Datagramm> sendedData;
private List<Datagramm> arrivingDataId;
private int currentDatagrammId = 0;
public delegate void OnDataSend(string data);
public event OnDataSend GetDataSend; // event
Thread serverThread;
int datapackSize = 150;
public ServerNetworkManager() { Init(); }
/// <summary>
/// Initialize varibles and Sockets
/// </summary>
private void Init()
{
endPoint = new IPEndPoint(GetIp(), 8080);
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
clientsEP = new List<IPEndPoint>();
commonUpdates = new List<UpdateData>();
importantUpdates = new List<UpdateData>();
sendedData = new List<Datagramm>();
arrivingDataId = new List<Datagramm>();
GetDataSend += AnalyzeData;
socket.Bind(endPoint);
}
/// <summary>
/// Получает IP устройства
/// </summary>
/// <returns></returns>
public static IPAddress GetIp()
{
var ips = NetworkInterface.GetAllNetworkInterfaces()
.Where(x => x.OperationalStatus == OperationalStatus.Up)
.Where(x => x.NetworkInterfaceType is NetworkInterfaceType.Wireless80211
or NetworkInterfaceType.Ethernet)
.SelectMany(x => x.GetIPProperties().UnicastAddresses)
.Where(x => x.Address.AddressFamily == AddressFamily.InterNetwork)
.Select(x => x.Address)
.ToList();
if (ips.Count > 0)
{
return ips[^1];
}
return IPAddress.Loopback;
}
public void SetIsMultiplayer(bool isMultiplayer)
{
this.isMultiplayer = isMultiplayer;
}
/// <summary>
/// отправляет клиенту Data
/// </summary>
public void SendData()
{
#region Network Sending SinglePlayerFix
//for (int i = 0; i < updates.Count; i++)
//{
// AppManager.Instance.client.GotData(updates[i]);
//}
//updates.Clear();
//return; //TODO TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK
//Что это?
//по 10 паков за раз TODO FIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXIT
#endregion
if (arrivingDataId.Count != 0)
{
List<Datagramm> actualArrivingId = arrivingDataId;
for (int i = 0; i < actualArrivingId.Count; i++)
{
sendedData.Remove(sendedData.Find(x => x.DatagrammId == actualArrivingId[i].DatagrammId
&& x.PlayerId == actualArrivingId[i].PlayerId));
}
arrivingDataId.Clear();
}
List<UpdateData> dataToSend;
if (importantUpdates.Count > 0)
{
dataToSend = new List<UpdateData>();
for (int j = 0; j < datapackSize && j < importantUpdates.Count; j++)
dataToSend.Add(importantUpdates[j]);
for (int i = 0; i < clientsEP.Count; i++)
{
Datagramm impDgramm = new Datagramm();
impDgramm.DatagrammId = currentDatagrammId;
impDgramm.updateDatas = dataToSend;
impDgramm.isImportant = true;
impDgramm.PlayerId = i + 1;
sendedData.Add(impDgramm);
}
for (int j = 0; j < datapackSize && j < dataToSend.Count; j++)
importantUpdates.RemoveAt(0);
currentDatagrammId++;
}
if (sendedData.Count != 0)
{
for (int i = 0; i < clientsEP.Count; i++)
{
foreach (Datagramm Dgramm in sendedData.Where(x => x.PlayerId == i + 1))
{
string impData = System.Text.Json.JsonSerializer.Serialize(Dgramm);
byte[] impBuffer = Encoding.UTF8.GetBytes(impData);
socket.SendTo(impBuffer, clientsEP[i]);
}
}
}
Datagramm unImpDgramm = new Datagramm();
dataToSend = new List<UpdateData>();
for (int i = 0; i < 200 && i < commonUpdates.Count; i++)
dataToSend.Add(commonUpdates[i]);
unImpDgramm.updateDatas = dataToSend;
string data = System.Text.Json.JsonSerializer.Serialize(unImpDgramm);
byte[] buffer = Encoding.UTF8.GetBytes(data);
foreach (EndPoint sendingEP in clientsEP)
{
socket.SendTo(buffer, sendingEP);
}
for (int i = 0; i < 200 && i < dataToSend.Count; i++)
commonUpdates.RemoveAt(0);
}
/// <summary>
/// добавляет в лист updates новую data
/// </summary>
/// <param name="data"></param>
public void AddData(UpdateData data)
{
if (data.isImportant)
{
importantUpdates.Add(data);
}
else
{
commonUpdates.Add(data);
}
}
/// <summary>
/// Начинает работу сервера (Ожидает подключений)
/// </summary>
/// <param name="players"></param>
public void Start()
{
serverThread = new Thread(StartWaitingForPlayers);
serverThread.IsBackground = true;
serverThread.Start();
}
public void StartGame()
{
for (int i = 0; i < clientsEP.Count; i++)
{
Datagramm initDgramm = new Datagramm();
initDgramm.isImportant = true;
initDgramm.DatagrammId = currentDatagrammId;
initDgramm.PlayerId = i + 1;
sendedData.Add(initDgramm);
string data = System.Text.Json.JsonSerializer.Serialize(initDgramm);
byte[] buffer = Encoding.UTF8.GetBytes(data);
socket.SendTo(buffer, clientsEP[i]);
}
currentDatagrammId++;
AppManager.Instance.ChangeState(GameState.HostPlaying);
AppManager.Instance.SetGUI(new HUD());////
}
public void CloseConnection()
{
//socket.Shutdown(SocketShutdown.Both);
clientsEP.Clear();
socket.Close();
}
//Потоки Клиентов
/// <summary>
/// Слушает игроков, которые хотят подключиться
/// </summary>
/// <param name="players"></param>
public void StartWaitingForPlayers()
{
byte[] buffer = new byte[65535];
string data;
int size;
try
{
while (socket != null)
{
EndPoint senderRemote = (EndPoint)new IPEndPoint(IPAddress.Any, 0);
size = socket.ReceiveFrom(buffer, buffer.Length, SocketFlags.None, ref senderRemote);
if (AppManager.Instance.gamestate != GameState.HostPlaying && !clientsEP.Contains(senderRemote) &&
senderRemote != new IPEndPoint(IPAddress.Any, 0))
{
clientsEP.Add((IPEndPoint)senderRemote);
AppManager.Instance.debugHud.Log($"Connect {senderRemote.ToString()}");
if (!isMultiplayer) AppManager.Instance.ChangeState(GameState.HostPlaying);
// Отправлять Init апдейт с информацией об ID игрока и ID датаграмма на сервере
//Можно добавить bool isInit для Датаграммов
}
byte[] correctedBuffer = new byte[size];
Array.Copy(buffer, correctedBuffer, size);
data = Encoding.UTF8.GetString(correctedBuffer);
GetDataSend(data);
}
}
catch (Exception)
{
return;
}
}
public void AnalyzeData(string data)
{
JObject jObj = JsonConvert.DeserializeObject(data) as JObject;
JToken token = JToken.FromObject(jObj);
JToken updateDatas = token["updateDatas"];
Datagramm Dgramm = new Datagramm();
Dgramm.PlayerId = token["PlayerId"].ToObject<int>();
if (!updateDatas.HasValues)
{
//Обработка acknowledgement
Dgramm.DatagrammId = token["DatagrammId"].ToObject<int>();
arrivingDataId.Add(Dgramm);
}
else
{
List<UpdateData> updates = GetSentUpdates(updateDatas);
AppManager.Instance.server.UpdatesList(updates);
}
}
public List<UpdateData> GetSentUpdates(JToken updatesToken)
{
List<UpdateData> data = new List<UpdateData>();
JArray updateDatas = updatesToken as JArray;
UpdateData update = new UpdateData();
foreach (JObject token in updateDatas.Children())
{
switch (token["UpdateType"].ToObject<string>())
{
case "UpdateInput":
update = token.ToObject<UpdateInput>();
data.Add(update);
break;
case "UpdateInputInteraction":
update = token.ToObject<UpdateInputInteraction>();
data.Add(update);
break;
case "UpdateInputShoot":
update = token.ToObject<UpdateInputShoot>();
data.Add(update);
break;
}
}
return data;
}
}
}
*/ //TODO: Перелопатить весь код и вынести на удалённый сервер

View file

@ -0,0 +1,19 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO
{
public class SerializablePoint
{
public int X { get; set; }
public int Y { get; set; }
public SerializablePoint(Point point) { X = point.X; Y = point.Y;}
public SerializablePoint() { }
public Point GetPoint() { return new Point(X, Y);}
}
}

View file

@ -0,0 +1,29 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO
{
[Serializable]
public class SerializableRectangle
{
public SerializablePoint Size { get; set; }
public SerializablePoint Location { get; set; }
public SerializableRectangle()
{
}
public SerializableRectangle(Rectangle rectangle) { Size = new SerializablePoint(rectangle.Size); Location = new SerializablePoint(rectangle.Location); }
public Rectangle GetRectangle()
{
return new Rectangle(Location.GetPoint(), Size.GetPoint());
}
}
}

View file

@ -0,0 +1,28 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.JavaScript;
using System.Text;
using System.Threading.Tasks;
namespace ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO
{
[Serializable]
public class SerializableVector2
{
public float X { get; set; }
public float Y { get; set; }
public SerializableVector2(Vector2 vector)
{
X = vector.X;
Y = vector.Y;
}
public Vector2 GetVector2()
{
return new Vector2(X, Y);
}
}
}

View file

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ServerOverall.Server.Updates.ClientToServer
{
public class UpdateInput :UpdateData
{
// public int IdEntity { get; set; }
public SerializableVector2 InputMovementDirection{get;set;}
public SerializableVector2 InputAttackDirection {get;set;}
public int PlayerId {get;set;}
public UpdateInput()
{
UpdateType = "UpdateInput";
}
}
}

View file

@ -0,0 +1,14 @@
using System;
using ZoFo.GameCore.GameManagers.NetworkManager;
namespace ServerOverall.Server.Updates.ClientToServer;
/// <summary>
/// уведомляет сервер о том, что игрок взаимодействует
/// </summary>
public class UpdateInputInteraction : UpdateData
{
public UpdateInputInteraction() { UpdateType = "UpdateInputInteraction"; }
public int PlayerId { get; set; }
}

View file

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ClientToServer
{
public class UpdatePlayerExit : UpdateData
{
public UpdatePlayerExit() { UpdateType = "UpdatePlayerExit"; }
}
}

View file

@ -0,0 +1,10 @@
using System;
using ZoFo.GameCore.GameManagers.NetworkManager.Updates;
namespace ServerOverall.Server.Updates.ClientToServer;
public class UpdateInputShoot : UpdateData
{
public UpdateInputShoot() { UpdateType = "UpdateInputShoot"; }
public int PlayerId { get; set; }
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates
{
public class Datagramm
{
public int DatagrammId { get; set; }
public bool isImportant { get; set; }
public List<UpdateData> updateDatas { get; set; }
public int PlayerId { get; set; }
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит новое сосотяние анимации
/// </summary>
public class UpdateAnimation : UpdateData
{
public UpdateAnimation() { UpdateType = "UpdateAnimation"; }
public string animationId { get; set; }
}
}

View file

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ServerOverall.Server.Updates.ServerToClient
{
public class UpdateCreatePlayer : UpdateData
{
public int PlayerId { get; set; }
public UpdateCreatePlayer()
{
isImportant = true;
UpdateType = "UpdateCreatePlayer";
}
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Обнивляет хп сущности
/// </summary>
public class UpdateEntityHealth : UpdateData
{
public UpdateEntityHealth() { UpdateType = "UpdateEntityHealth"; }
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит полученый лут и уведомляет о конце игры
/// </summary>
public class UpdateGameEnded : UpdateData
{
public UpdateGameEnded() { UpdateType = "UpdateGameEnded"; }
}
}

View file

@ -0,0 +1,16 @@

using Microsoft.Xna.Framework;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит новое сосотяние анимации
/// </summary>
public class UpdateGameObjectWithoutIdCreated : UpdateData
{
public UpdateGameObjectWithoutIdCreated() { UpdateType = "UpdateGameObjectWithoutIdCreated"; isImportant = true; }
public string GameObjectClassName { get; set; }
public SerializableVector2 position { get; set; }
}
}

View file

@ -0,0 +1,24 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит объект, который только отправили
/// </summary>
public class UpdateGameObjectCreated : UpdateData
{
public UpdateGameObjectCreated() { UpdateType = "UpdateGameObjectCreated"; isImportant = true; }
public string GameObjectType { get; set; }
public string GameObjectId { get; set; }
public SerializableVector2 position { get; set; }
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит объект, который надо удлить
/// </summary>
public class UpdateGameObjectDeleted : UpdateData
{
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
public string GameObjectType { get; set; }
}
}

View file

@ -0,0 +1,18 @@
namespace ServerOverall.Server.Updates.ServerToClient;
/// <summary>
/// При попытке взаимодействия с объектом
/// отправляет пользователю разрешение на взаимодействие
/// TODO: Вероятно убрать(обсудить)
/// </summary>
public class UpdateInteraction : UpdateData
{
public UpdateInteraction() { UpdateType = "UpdateInteraction"; }
public UpdateInteraction(int id)
{
IdEntity = id;
}
public int IdEntity { get; set; }
public string UpdateType { get; set; }
}

View file

@ -0,0 +1,14 @@
namespace ServerOverall.Server.Updates.ServerToClient;
/// <summary>
/// При изменении возможности повзаимодействовать с объектом
/// </summary>
/// <param name="idEntity"></param>
/// <param name="isReady"></param>
public class UpdateInteractionReady(int idEntity, bool isReady)
: UpdateData
{
public int IdEntity { get; set; } = idEntity;
public string UpdateType { get; set; } = "UpdateInteractionReady";
public bool IsReady { get; set; } = isReady;
}

View file

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит лут
/// </summary>
public class UpdateLoot : UpdateData
{
public string lootName { get; set; }
public int quantity { get; set; }
public UpdateLoot() { UpdateType = "UpdateLoot"; isImportant = true; }
public UpdateLoot(string lootName, int quantity, int id)
{
UpdateType = "UpdateLoot";
this.lootName = lootName;
this.quantity = quantity;
IdEntity = id;
isImportant = true;
}
}
}

View file

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит хп, радиацию
/// </summary>
public class UpdatePlayerParametrs : UpdateData
{
public UpdatePlayerParametrs() { UpdateType = "UpdatePlayerParametrs"; isImportant = true; }
public float radiatoin { get; set; }
public float health { get; set; }
}
}

View file

@ -0,0 +1,21 @@
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
using ZoFo.GameCore.GameObjects.Entities.LivingEntities;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// Хранит новую позицию
/// </summary>
public class UpdatePosition : UpdateData
{
public UpdatePosition() { UpdateType = "UpdatePosition"; }
public SerializableVector2 NewPosition { get; set; }
}
}

View file

@ -0,0 +1,22 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
namespace ServerOverall.Server.Updates.ServerToClient
{
internal class UpdateStopObjectCreated : UpdateData
{
public UpdateStopObjectCreated() { UpdateType = "UpdateStopObjectCreated"; isImportant = true; }
public Texture2D TextureTile { get; set; }
public SerializableVector2 Position { get; set; }
public SerializablePoint Size { get; set; }
public SerializableRectangle sourceRectangle { get; set; }
public string tileSetName { get; set; }
public SerializableRectangle[] collisions { get; set; }
}
}

View file

@ -0,0 +1,27 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
using ServerOverall.Server.Updates.ClientToServer;
namespace ServerOverall.Server.Updates.ServerToClient
{
/// <summary>
/// При создании тайла
/// </summary>
public class UpdateTileCreated : UpdateData
{
public UpdateTileCreated() { UpdateType = "UpdateTileCreated"; isImportant = true; }
[JsonInclude]
public SerializableVector2 Position { get; set; }
public SerializablePoint Size { get; set; }
public SerializableRectangle sourceRectangle { get; set; }
public string tileSetName { get; set; }
}
}

View file

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using ServerOverall.Server.Updates.ServerToClient;
namespace ServerOverall.Server.Updates
{
[JsonDerivedType(typeof(UpdateAnimation))]
[JsonDerivedType(typeof(UpdateEntityHealth))]
[JsonDerivedType(typeof(UpdateGameEnded))]
[JsonDerivedType(typeof(UpdateGameObjectCreated))]
[JsonDerivedType(typeof(UpdateGameObjectDeleted))]
[JsonDerivedType(typeof(UpdateInteraction))]
[JsonDerivedType(typeof(UpdateInteractionReady))]
[JsonDerivedType(typeof(UpdateLoot))]
[JsonDerivedType(typeof(UpdateGameObjectWithoutIdCreated))]
[JsonDerivedType(typeof(UpdatePlayerParametrs))]
[JsonDerivedType(typeof(UpdatePosition))]
[JsonDerivedType(typeof(UpdateStopObjectCreated))]
[JsonDerivedType(typeof(UpdateTileCreated))]
[JsonDerivedType(typeof(UpdateCreatePlayer))]
public class UpdateData
{
public int IdEntity { get; set; } //Id объекта
public string UpdateType { get; set; } //тип обновления
public bool isImportant { get; set; }
public UpdateData()
{
}
public UpdateData(int idEntity)
{
this.IdEntity = idEntity;
}
}
}

View file

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>

14
ServerOverall1/App.config Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

15
ServerOverall1/Program.cs Normal file
View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerOverall
{
internal class Program
{
static void Main(string[] args)
{
}
}
}

View file

@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанные с этой сборкой.
[assembly: AssemblyTitle("ServerOverall")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ServerOverall")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// из модели COM задайте для атрибута ComVisible этого типа значение true.
[assembly: ComVisible(false)]
// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM
[assembly: Guid("7a1873b0-1318-460a-aacd-f7ca1e78e5e0")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Номер редакции
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7A1873B0-1318-460A-AACD-F7CA1E78E5E0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ServerOverall</RootNamespace>
<AssemblyName>ServerOverall</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=8.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.8.0.4\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="NetworkManager.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net48" />
<package id="System.Text.Json" version="8.0.4" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>

View file

@ -9,7 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonogameLibrary", "Monogame
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnimationsFileCreator", "AnimationsFileCreator\AnimationsFileCreator.csproj", "{7B143D5C-5198-4ADE-9291-ECC924B78633}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnimationsFileCreator", "AnimationsFileCreator\AnimationsFileCreator.csproj", "{7B143D5C-5198-4ADE-9291-ECC924B78633}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnimatorFileCreatorAdvanced", "AnimatorFileCreatorAdvanced\AnimatorFileCreatorAdvanced.csproj", "{AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AnimatorFileCreatorAdvanced", "AnimatorFileCreatorAdvanced\AnimatorFileCreatorAdvanced.csproj", "{AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerOverall", "ServerOverall\ServerOverall.csproj", "{A97BE14F-A7F7-4272-9F24-FBC105AF0115}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -33,8 +35,15 @@ Global
{AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Debug|Any CPU.Build.0 = Debug|Any CPU {AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Release|Any CPU.ActiveCfg = Release|Any CPU {AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Release|Any CPU.Build.0 = Release|Any CPU {AAEC2150-3BBF-4B59-A22F-47B30CA6B34B}.Release|Any CPU.Build.0 = Release|Any CPU
{A97BE14F-A7F7-4272-9F24-FBC105AF0115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A97BE14F-A7F7-4272-9F24-FBC105AF0115}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A97BE14F-A7F7-4272-9F24-FBC105AF0115}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A97BE14F-A7F7-4272-9F24-FBC105AF0115}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BC970026-AE46-4703-8325-D065CFEE9756}
EndGlobalSection
EndGlobal EndGlobal