Merge pull request #110 from progtime-net/UpdateGameStarted
UpdateGameStartedCommit
This commit is contained in:
commit
291beeb61c
4 changed files with 24 additions and 3 deletions
|
@ -191,8 +191,11 @@ namespace ZoFo.GameCore
|
|||
}
|
||||
internal void GotData(UpdateData update)
|
||||
{
|
||||
|
||||
if (update is UpdateTileCreated)
|
||||
if (update is UpdateGameStarted)
|
||||
{
|
||||
//Дописать логику
|
||||
}
|
||||
else if (update is UpdateTileCreated)
|
||||
{
|
||||
mapObjects.Add(
|
||||
new MapObject(
|
||||
|
|
|
@ -179,6 +179,10 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
update = token.ToObject<UpdateCreatePlayer>();
|
||||
data.Add(update);
|
||||
break;
|
||||
case "UpdateGameStarted":
|
||||
update = token.ToObject<UpdateGameStarted>();
|
||||
data.Add(update);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
||||
{
|
||||
public class UpdateGameStarted : UpdateData
|
||||
{
|
||||
public UpdateGameStarted() { UpdateType = "UpdateGameStarted"; }
|
||||
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates
|
|||
[JsonDerivedType(typeof(UpdateInputInteraction))]
|
||||
[JsonDerivedType(typeof(UpdateInputShoot))]
|
||||
[JsonDerivedType(typeof(UpdateCreatePlayer))]
|
||||
|
||||
[JsonDerivedType(typeof(UpdateGameStarted))]
|
||||
public class UpdateData
|
||||
{
|
||||
public int IdEntity { get; set; } //Id объекта
|
||||
|
|
Loading…
Add table
Reference in a new issue