ClirntReadyDataSend
This commit is contained in:
parent
580d9a2327
commit
91d15a9de5
1 changed files with 17 additions and 4 deletions
|
@ -7,6 +7,8 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates;
|
|||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using ZoFo.GameCore.GameObjects;
|
||||
using ZoFo.GameCore.GameObjects.MapObjects;
|
||||
|
||||
namespace ZoFo.GameCore
|
||||
{
|
||||
|
@ -22,21 +24,32 @@ namespace ZoFo.GameCore
|
|||
}
|
||||
|
||||
public void OnDataSend(string data)
|
||||
{
|
||||
{
|
||||
List<IUpdateData> updateDatas = JsonSerializer.Deserialize<List<IUpdateData>>(data);
|
||||
// тут будет switch
|
||||
foreach (var item in updateDatas)
|
||||
{
|
||||
/* switch (item.UpdateType) Здесь нужно отлавливать и регистрировать
|
||||
{
|
||||
case "Tile":
|
||||
MapObject map = new MapObject();
|
||||
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
public void GameEndedUnexpectedly(){ }
|
||||
public void GameEndedUnexpectedly() { }
|
||||
public void JoinRoom(string ip)
|
||||
{
|
||||
networkManager.JoinRoom(ip);
|
||||
}
|
||||
public void JoinYourself(){ networkManager.JoinYourself(); }
|
||||
public void JoinYourself() { networkManager.JoinYourself(); }
|
||||
internal void Update(GameTime gameTime)
|
||||
{
|
||||
}
|
||||
internal void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue