Přidány základy generování mapy (zatím pouze server-side, bez zrcadlení do clienta)
This commit is contained in:
parent
8a3267cc4b
commit
8801a7c919
6 changed files with 100 additions and 1 deletions
18
FNAF_Server/Map/TileConnector.cs
Normal file
18
FNAF_Server/Map/TileConnector.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
namespace FNAF_Server.Map;
|
||||
|
||||
public struct TileConnector(MapTile tile1, MapTile tile2, TileConnector.ConnectorType type, int value) {
|
||||
public (MapTile, MapTile) Tiles { get; set; } = (tile1, tile2);
|
||||
public ConnectorType Type { get; set; } = type;
|
||||
public bool Blocked { get; set; } = false;
|
||||
public int Value{ get; set; } = value;
|
||||
|
||||
public MapTile OtherTile(MapTile tile) => Tiles.Item1 == tile ? Tiles.Item2 : Tiles.Item1;
|
||||
|
||||
public override string ToString() => $"Con ({Tiles.Item1.PositionAsString} -> {Tiles.Item2.PositionAsString})";
|
||||
public enum ConnectorType {
|
||||
HALL,
|
||||
DOOR,
|
||||
VENT
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue