MapCOmmit

This commit is contained in:
AnloGames 2024-08-19 21:49:41 +03:00
parent 332680a8eb
commit 68ab2a4498
2 changed files with 52 additions and 47 deletions

View file

@ -119,7 +119,9 @@ namespace ZoFo.GameCore
} }
} }
internal void GotData(UpdateData update) internal void GotData(List<UpdateData> updates)
{
foreach (UpdateData update in updates)
{ {
if (update is UpdateTileCreated) if (update is UpdateTileCreated)
{ {
@ -166,13 +168,15 @@ namespace ZoFo.GameCore
//as GameObject //as GameObject
//); //);
} }
else if (update is UpdatePosition) //else if (update is UpdatePosition)
{ //{
var ent = FindEntityById(update.IdEntity); // var ent = FindEntityById(update.IdEntity);
ent.position = (update as UpdatePosition).NewPosition.GetVector2(); // ent.position = (update as UpdatePosition).NewPosition.GetVector2();
DebugHUD.Instance.Log("newPosition " + ent.position); // DebugHUD.Instance.Log("newPosition " + ent.position);
//}
} }
} }

View file

@ -176,6 +176,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
} }
void ExecuteDatagramm(Datagramm Dgramm) void ExecuteDatagramm(Datagramm Dgramm)
{ {
AppManager.Instance.client.GotData(Dgramm.updateDatas);
//Достаёт Update и передает в ивент //Достаёт Update и передает в ивент
} }