Remote dveře lze na mapě otevírat a zavírat. Office dveře hráče lze vidět na mapě (ukazují se ale pouze pro hráče 1). PlayerCommandy, které přepínají mezi dvěma stavy mají přidaný parametr state - client tudíž určuje jejich nový stav. Pokud se neshoduje stav v GameEventu se stavem odeslaným v Commandu, zobrazí se v konzoli varování. Client již nečeká na odpověď serveru při změně UI. Connectory se neklonují, oba tily používají stejnou instanci.
This commit is contained in:
parent
70b5debb22
commit
cea56112ea
14 changed files with 112 additions and 48 deletions
|
|
@ -4,7 +4,7 @@ namespace FNAF_Clone.Map;
|
|||
|
||||
public class ClientMapManager {
|
||||
private static MapTileProjection[,] map = new MapTileProjection[5, 5];
|
||||
private static MapTileProjection Get((int x, int y) coords) => map[coords.x, coords.y];
|
||||
public static MapTileProjection Get((int x, int y) coords) => map[coords.x, coords.y];
|
||||
public static MapTileProjection Get(int tileId) => Get(MapTileProjection.IdToCoords(tileId));
|
||||
public static void InitMap() {
|
||||
for (int i = 0; i < 5; i++){
|
||||
|
|
@ -17,8 +17,6 @@ public class ClientMapManager {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void InitConnectors(TileConnectorProjection[] connectors) {
|
||||
|
|
@ -29,7 +27,7 @@ public class ClientMapManager {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static TileConnectorProjection GetConnector((int, int) id) => Get(id.Item1).GetConnector(id.Item2);
|
||||
|
||||
public static TileConnectorProjection[] GetConnectors(int tileId) => Get(MapTileProjection.IdToCoords(tileId)).GetAllConnectors();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue