Eventy upraveny pro podporu dvou hráčů. Všechny dveře se zobrazují na správných pozicích pro oba hráče.
This commit is contained in:
parent
cea56112ea
commit
3049417914
18 changed files with 157 additions and 75 deletions
|
|
@ -5,7 +5,7 @@ namespace PacketLib;
|
|||
|
||||
#nullable disable
|
||||
public struct GameEvent : INetSerializable{
|
||||
public static GameEvent PLAYER_JOIN(int pid) => new(){ID = 0, Args = [pid] };
|
||||
public static GameEvent PLAYER_JOIN(int pid) => new(){ID = 0, Args = [pid] }; // TODO: username sync
|
||||
public static GameEvent PLAYER_LEAVE(int pid) => new(){ID = 1, Args = [pid] };
|
||||
public static GameEvent SWITCH_CAM(int pid, int id) => new(){ID = 2, Args = [pid, id] };
|
||||
public static GameEvent TOGGLE_MONITOR(int pid, bool state) => new(){ID = 3, Args = [pid, state ? 1 : 0]};
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@ namespace PacketLib;
|
|||
|
||||
public class JoinAcceptPacket {
|
||||
public PlayerState state { get; set; }
|
||||
// public PlayerState otherPlayerState { get; set; }
|
||||
}
|
||||
|
|
@ -2,5 +2,5 @@ namespace PacketLib;
|
|||
|
||||
public class MapInitPacket {
|
||||
public int[] Connectors { get; set; } // triplets (tile1 id, tile2 id, type)
|
||||
|
||||
public bool UpsideDown { get; set; }
|
||||
}
|
||||
5
PacketLib/OpponentInitPacket.cs
Normal file
5
PacketLib/OpponentInitPacket.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
namespace PacketLib;
|
||||
|
||||
public class OpponentInitPacket {
|
||||
public PlayerState state { get; set; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue