Merge branch 'Development' of github.com:progtime-net/ZoFo into Development
This commit is contained in:
commit
8dbce7b229
10 changed files with 143 additions and 6 deletions
|
@ -7,7 +7,7 @@ namespace ZoFo.GameCore
|
||||||
|
|
||||||
public void GameEndedUnexpectedly(){ }
|
public void GameEndedUnexpectedly(){ }
|
||||||
|
|
||||||
public void JoinRoom() { }
|
public void JoinRoom(){ }
|
||||||
|
|
||||||
public void JoinYourself(){ }
|
public void JoinYourself(){ }
|
||||||
}
|
}
|
||||||
|
|
17
ZoFo/GameCore/GameManagers/MapManager/MapElements/Chunk.cs
Normal file
17
ZoFo/GameCore/GameManagers/MapManager/MapElements/Chunk.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
||||||
|
{
|
||||||
|
public class Chunk
|
||||||
|
{
|
||||||
|
public int[] Data { get; set; }
|
||||||
|
public int Height { get; set; }
|
||||||
|
public int Width { get; set; }
|
||||||
|
public int X { get; set; }
|
||||||
|
public int Y { get; set; }
|
||||||
|
}
|
||||||
|
}
|
17
ZoFo/GameCore/GameManagers/MapManager/MapElements/Layer.cs
Normal file
17
ZoFo/GameCore/GameManagers/MapManager/MapElements/Layer.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
||||||
|
{
|
||||||
|
public class Layer
|
||||||
|
{
|
||||||
|
public List<Chunk> Chunks { get; set; }
|
||||||
|
public int Height { get; set; }
|
||||||
|
public int Width { get; set; }
|
||||||
|
public int Id { get; set; }
|
||||||
|
public bool Visibility { get; set; }
|
||||||
|
}
|
||||||
|
}
|
16
ZoFo/GameCore/GameManagers/MapManager/MapElements/TileMap.cs
Normal file
16
ZoFo/GameCore/GameManagers/MapManager/MapElements/TileMap.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
||||||
|
{
|
||||||
|
public class TileMap
|
||||||
|
{
|
||||||
|
public bool Infinite { get; set; }
|
||||||
|
public int TileHeight { get; set; }
|
||||||
|
public int TileWidth { get; set; }
|
||||||
|
public List<TileSet> TileSets { get; set; }
|
||||||
|
}
|
||||||
|
}
|
12
ZoFo/GameCore/GameManagers/MapManager/MapElements/TileSet.cs
Normal file
12
ZoFo/GameCore/GameManagers/MapManager/MapElements/TileSet.cs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
||||||
|
{
|
||||||
|
public class TileSet
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
21
ZoFo/GameCore/GameManagers/MapManager/MapManager.cs
Normal file
21
ZoFo/GameCore/GameManagers/MapManager/MapManager.cs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.MapManager
|
||||||
|
{
|
||||||
|
public class MapManager
|
||||||
|
{
|
||||||
|
public void LoadMap()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void LoadTileSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,17 +1,55 @@
|
||||||
|
using System;
|
||||||
|
using System.Data.SqlTypes;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
|
|
||||||
namespace ZoFo.GameCore.GameManagers.NetworkManager
|
namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
{
|
{
|
||||||
public delegate void OnDataSent(string Data);
|
|
||||||
|
|
||||||
public class ClientNetworkManager
|
public class ClientNetworkManager
|
||||||
{
|
{
|
||||||
public event OnDataSent DataSent;
|
private IPAddress iPAddress = IPAddress.Any;
|
||||||
public static void StartListening()
|
private int port = 7632;
|
||||||
|
private EndPoint endPoint;
|
||||||
|
private Socket socket;
|
||||||
|
delegate void OnDataSent(string Data);
|
||||||
|
event OnDataSent GetDataSent; // event
|
||||||
|
public void Init() //create endPoint, socket
|
||||||
|
{
|
||||||
|
endPoint = new IPEndPoint(iPAddress, port);
|
||||||
|
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendData()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void JoinRoom() // multyplayer
|
||||||
|
{
|
||||||
|
SendData();
|
||||||
|
StartListening();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void JoinYourself() // single player
|
||||||
|
{
|
||||||
|
SendData();
|
||||||
|
StartListening();
|
||||||
|
}
|
||||||
|
|
||||||
|
//поток 2
|
||||||
|
public void StartListening()
|
||||||
|
{
|
||||||
|
socket.Connect(endPoint);
|
||||||
|
|
||||||
|
byte[] bytes = new byte[2048];
|
||||||
|
|
||||||
|
var countAnsw = socket.Receive(bytes);
|
||||||
|
|
||||||
|
string updates = Encoding.UTF8.GetString(bytes, 0, countAnsw); // обновления отосланные сервером
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,7 +6,9 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer
|
namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer
|
||||||
{
|
{
|
||||||
internal class UpdateInput
|
public class UpdateInput :IUpdateData
|
||||||
{
|
{
|
||||||
|
public int IdEntity { get; set; }
|
||||||
|
public string UpdateType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,13 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
||||||
|
<<<<<<< HEAD
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\MonogameLibrary\MonogameLibrary.csproj" />
|
<ProjectReference Include="..\MonogameLibrary\MonogameLibrary.csproj" />
|
||||||
|
=======
|
||||||
|
>>>>>>> CollisionManager
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Content\Texture\GUI\" />
|
<Folder Include="Content\Texture\GUI\" />
|
||||||
|
|
11
macos-fix-mgcb.sh
Executable file
11
macos-fix-mgcb.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
brew install freetype
|
||||||
|
brew install freeimage
|
||||||
|
mgcb_ver=$(ls ~/.nuget/packages/dotnet-mgcb/)
|
||||||
|
mgcb_path=~/.nuget/packages/dotnet-mgcb/$mgcb_ver/tools/net6.0/any/
|
||||||
|
|
||||||
|
rm $mgcb_path/libfreetype6.dylib $mgcb_path/libFreeImage.dylib
|
||||||
|
|
||||||
|
ln -s /opt/homebrew/lib/libfreetype.dylib $mgcb_path/libfreetype6.dylib
|
||||||
|
ln -s /opt/homebrew/lib/libfreeimage.dylib $mgcb_path/libFreeImage.dylib
|
Loading…
Add table
Reference in a new issue