Rozsvěcení a zhasínání světel, sprity pro místnosti, indikátory rozsvícených světel, po konci hry je hráč vrácen do hlavního menu

This commit is contained in:
Perry 2026-03-16 20:43:53 +01:00
parent 25a62af483
commit 55fd052072
27 changed files with 338 additions and 113 deletions

View file

@ -23,6 +23,7 @@ public struct GameEvent : INetSerializable{
public static GameEvent GAME_START() => new(){ID = 12};
public static GameEvent POWER_TICK(int pid, int power) => new(){ID = 13, Args = [pid, power]};
public static GameEvent POWER_OUT(int pid) => new(){ID = 14, Args = [pid]};
public static GameEvent TOGGLE_LIGHT(int pid, int camId, bool state) => new(){ID = 15, Args = [pid, camId, state ? 1 : 0]};
public int ID{ get; set; }
public bool Hideable => ID < 0;

View file

@ -4,5 +4,6 @@ public class MapInitPacket {
public int[] Connectors { get; set; } // quadruplets (tile1 id, tile2 id, type, owner)
public int[] YourTiles { get; set; }
public int[] OpponentTiles { get; set; }
public int[] LitTiles{ get; set; }
public bool UpsideDown { get; set; }
}

View file

@ -8,6 +8,7 @@ public struct PlayerCommand : INetSerializable {
public static PlayerCommand SET_MONITOR(bool state) => new(){ID = 1, Args = [state ? 1 : 0]};
public static PlayerCommand SET_DOOR_OFFICE(Direction direction, bool state) => new(){ID = 2, Args = [(int)direction, state ? 1 : 0]};
public static PlayerCommand SET_DOOR_REMOTE((int, int) remoteDoorId, bool state) => new(){ID = 3, Args = [remoteDoorId.Item1, remoteDoorId.Item2, state ? 1 : 0]};
public static PlayerCommand SET_LIGHT(int camId, bool state) => new(){ID = 4, Args = [camId, state ? 1 : 0]};
public int ID{ get; set; }
public bool Hideable => ID < 0;
public int[] Args{ get; private set; }