UpdateTileCreated
This commit is contained in:
parent
0ad40ac2d3
commit
069b62abee
3 changed files with 28 additions and 3 deletions
|
@ -64,12 +64,14 @@ public class SelectModeMenu : AbstractGUI
|
|||
optionButton.LeftButtonPressed += () =>
|
||||
{
|
||||
// multi
|
||||
Server server = new Server(); //Server Logic SinglePlayer
|
||||
Server server = new Server(); //Server Logic MultiPlayer
|
||||
Client client = new Client();
|
||||
server.CreateRoom(1);
|
||||
client.JoinYourself();
|
||||
server.CreateRoom(5);
|
||||
client.JoinRoom("127.0.0.1"); //указать айпишник
|
||||
AppManager.Instance.SetServer(server);
|
||||
AppManager.Instance.SetClient(client);
|
||||
string key = client.IsConnected.ToString();
|
||||
AppManager.Instance.debugHud.Set(key, "MultiPlayer");
|
||||
// ваш код здесь
|
||||
};
|
||||
Elements.Add(optionButton);
|
||||
|
|
|
@ -17,8 +17,10 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates
|
|||
[JsonDerivedType(typeof(UpdateLoot))]
|
||||
[JsonDerivedType(typeof(UpdatePlayerParametrs))]
|
||||
[JsonDerivedType(typeof(UpdatePosition))]
|
||||
[JsonDerivedType(typeof(UpdateTileCreated))]
|
||||
[JsonDerivedType(typeof(UpdateInput))]
|
||||
[JsonDerivedType(typeof(UpdatePlayerExit))]
|
||||
|
||||
public interface IUpdateData
|
||||
{
|
||||
public int IdEntity { get; set; } //Id объекта
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer;
|
||||
|
||||
namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
||||
{
|
||||
|
||||
public class UpdateTileCreated : IUpdateData
|
||||
{
|
||||
public int IdEntity { get; set; }
|
||||
public string UpdateType { get; set; }
|
||||
public Texture2D TextureTile { get; set; }
|
||||
public Vector2 Position { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue