public void Deserialize(string value) { var match = Regex.Match(value, "^Key: (.*), X: (-?[0-9]*), Y: (-?[0-9]*)$"); Key = new MapKey(match.Groups[1].Value); X = int.Parse(match.Groups[2].Value); Y = int.Parse(match.Groups[3].Value); }
public Map(string key, IEntity defaultCell) { CheckEntityIsCell(defaultCell); MapKey = new MapKey(key); DefaultCell = defaultCell; FovCache = new FovCache(); }
public override bool Equals(object obj) { MapKey other = obj as MapKey; if (other == null) { return(false); } return(Key.Equals(other.Key)); }
public MapCoordinate(MapKey mapKey, Vector vector) { Key = mapKey; X = vector.X; Y = vector.Y; }
public MapCoordinate(string key, int x, int y) { Key = new MapKey(key); X = x; Y = y; }
public MapCoordinate(MapKey mapKey, int x, int y) { Key = mapKey; X = x; Y = y; }