예제 #1
0
        public MapDrawableBatch(int numberOfTiles, int textureTileDimensionWidth, int textureTileDimensionHeight, Texture2D texture)
            : base()
        {
            if (texture == null)
                throw new ArgumentNullException("texture");

            Visible = true;
            InternalInitialize();

            mTexture = texture;
            mVertices = new VertexPositionTexture[4 * numberOfTiles];
            mIndices = new short[6 * numberOfTiles];

            mTileset = new Tileset(texture, textureTileDimensionWidth, textureTileDimensionHeight);
        }