예제 #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;
 }