Merge pull request #77 from progtime-net/animations-recursive
Add recursive load of animations
This commit is contained in:
commit
4c8b65f7e5
3 changed files with 3 additions and 3 deletions
|
@ -124,7 +124,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
while(socket.Connected)
|
while(socket.Connected)
|
||||||
{
|
{
|
||||||
byte[] bytes = new byte[65535];
|
byte[] bytes = new byte[65535];
|
||||||
var countAnsw = socket.Receive(bytes, SocketFlags.Partial); //Вылетает если кто то закрыл
|
var countAnsw = socket.Receive(bytes); //Вылетает если кто то закрыл
|
||||||
string update = Encoding.UTF8.GetString(bytes, 0, countAnsw); // обновление отосланные сервером
|
string update = Encoding.UTF8.GetString(bytes, 0, countAnsw); // обновление отосланные сервером
|
||||||
GetDataSent(update);
|
GetDataSent(update);
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
while (client.Connected)
|
while (client.Connected)
|
||||||
{
|
{
|
||||||
var buff = new byte[65535];
|
var buff = new byte[65535];
|
||||||
var answ = client.Receive(buff, SocketFlags.Partial);
|
var answ = client.Receive(buff);
|
||||||
string response = Encoding.UTF8.GetString(buff, 0, answ);
|
string response = Encoding.UTF8.GetString(buff, 0, answ);
|
||||||
GetDataSend(response);
|
GetDataSend(response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace ZoFo.GameCore.Graphics
|
||||||
public void LoadAnimations()
|
public void LoadAnimations()
|
||||||
{
|
{
|
||||||
Animations = new List<AnimationContainer>();
|
Animations = new List<AnimationContainer>();
|
||||||
string[] animationFilesNames = Directory.GetFiles(Path.Combine(AppContext.BaseDirectory, "Content", "Textures", "Animations"));
|
string[] animationFilesNames = Directory.GetFiles(Path.Combine(AppContext.BaseDirectory, "Content", "Textures", "Animations"), "*.animation", SearchOption.AllDirectories);
|
||||||
|
|
||||||
StreamReader reader;
|
StreamReader reader;
|
||||||
foreach (var fileName in animationFilesNames)
|
foreach (var fileName in animationFilesNames)
|
||||||
|
|
Loading…
Add table
Reference in a new issue