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:
Perry 2026-02-25 17:05:15 +01:00
parent cea56112ea
commit 3049417914
18 changed files with 157 additions and 75 deletions

View file

@ -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]};

View file

@ -2,4 +2,5 @@ namespace PacketLib;
public class JoinAcceptPacket {
public PlayerState state { get; set; }
// public PlayerState otherPlayerState { get; set; }
}

View file

@ -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; }
}

View file

@ -0,0 +1,5 @@
namespace PacketLib;
public class OpponentInitPacket {
public PlayerState state { get; set; }
}