示例#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);
        }
示例#2
0
        public Map(string key, IEntity defaultCell)
        {
            CheckEntityIsCell(defaultCell);

            MapKey      = new MapKey(key);
            DefaultCell = defaultCell;
            FovCache    = new FovCache();
        }
示例#3
0
        public override bool Equals(object obj)
        {
            MapKey other = obj as MapKey;

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

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