Пример #1
0
        public Tileset(string textureName, int width, int height, Rectangle[] rects)
        {
            Texture2D texture = GraphicsLoader.GetTextureOrLoad(textureName);

            _texture    = texture;
            _tileWidth  = texture.Width / width;
            _tileHeight = texture.Height / height;

            _rectangles = rects;
        }
Пример #2
0
        public Tileset(string textureName, int width, int height)
        {
            Texture2D texture = GraphicsLoader.GetTextureOrLoad(textureName);

            Create(texture, width, height);
        }