18 lines
645 B
C#
18 lines
645 B
C#
|
|
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
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|