Beispiel #1
0
        public TileDataset GetDataset(string tileset, int pixelSize)
        {
            TileDataset ret = null;

            if (!Datasets.TryGetValue(tileset, out ret))
            {
                ret = new TileDataset(tileset, pixelSize);
                Datasets[tileset] = ret;
            }
            return(ret);
        }
Beispiel #2
0
        private void SetSingle(int x, int y)
        {
            var node = _level.GetNodeAtPoint(x, y, _size);

            if (_lastSet == null || _lastNode != node)
            {
                _lastSet  = node.GetDataset(Tileset, _pixelSize);
                _lastNode = node;
            }
            _lastSet.Set(x - node.IndexX * _size, y - node.IndexY * _size, _borders);
        }