Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public Map(string key, IEntity defaultCell)
        {
            CheckEntityIsCell(defaultCell);

            MapKey      = new MapKey(key);
            DefaultCell = defaultCell;
            FovCache    = new FovCache();
        }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            MapKey other = obj as MapKey;

            if (other == null)
            {
                return(false);
            }

            return(Key.Equals(other.Key));
        }
Exemplo n.º 4
0
 public MapCoordinate(MapKey mapKey, Vector vector)
 {
     Key = mapKey;
     X   = vector.X;
     Y   = vector.Y;
 }
Exemplo n.º 5
0
 public MapCoordinate(string key, int x, int y)
 {
     Key = new MapKey(key);
     X   = x;
     Y   = y;
 }
Exemplo n.º 6
0
 public MapCoordinate(MapKey mapKey, int x, int y)
 {
     Key = mapKey;
     X   = x;
     Y   = y;
 }