Пример #1
0
        /// <summary>
        /// Adds the texture of the most recently added face to the list of uvs.
        /// </summary>
        /// <param name="blockType">The block type which contains the desired texture coordinates.</param>
        /// <param name="uvs">The list of UVs.</param>
        void AddRecentFaceTexture(AbstractBlock blockType, List <Vector2> uvs)
        {
            Vector2 tileMapCoordinate = blockType.tileMapCoordinate();

            uvs.Add(
                new Vector2(
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.x + ConfigurationManager.Instance.Tile_Map_Unit_Ratio,
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.y
                    )
                );
            uvs.Add(
                new Vector2(
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.x + ConfigurationManager.Instance.Tile_Map_Unit_Ratio,
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.y + ConfigurationManager.Instance.Tile_Map_Unit_Ratio
                    )
                );
            uvs.Add(
                new Vector2(
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.x,
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.y + ConfigurationManager.Instance.Tile_Map_Unit_Ratio
                    )
                );
            uvs.Add(
                new Vector2(
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.x,
                    ConfigurationManager.Instance.Tile_Map_Unit_Ratio * tileMapCoordinate.y
                    )
                );
        }