MapCOmmit
This commit is contained in:
parent
332680a8eb
commit
68ab2a4498
2 changed files with 52 additions and 47 deletions
|
@ -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)
|
||||
{
|
||||
|
@ -166,13 +168,15 @@ namespace ZoFo.GameCore
|
|||
//as GameObject
|
||||
//);
|
||||
}
|
||||
else if (update is UpdatePosition)
|
||||
{
|
||||
var ent = FindEntityById(update.IdEntity);
|
||||
//else if (update is UpdatePosition)
|
||||
//{
|
||||
// var ent = FindEntityById(update.IdEntity);
|
||||
|
||||
ent.position = (update as UpdatePosition).NewPosition.GetVector2();
|
||||
DebugHUD.Instance.Log("newPosition " + ent.position);
|
||||
// ent.position = (update as UpdatePosition).NewPosition.GetVector2();
|
||||
// DebugHUD.Instance.Log("newPosition " + ent.position);
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
}
|
||||
void ExecuteDatagramm(Datagramm Dgramm)
|
||||
{
|
||||
AppManager.Instance.client.GotData(Dgramm.updateDatas);
|
||||
//Достаёт Update и передает в ивент
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue