Пример #1
0
 /// <summary>Lets you replace a region of pixels in one texture with the contents of another texture. The texture asset referenced by patchAssetName has to be in xnb format.</summary>
 /// <param name="helper">The <see cref="IContentHelper" /> this extension method is attached to.</param>
 /// <param name="assetName">The texture asset (Relative to Content and without extension) that you wish to modify.</param>
 /// <param name="patchAssetName">The texture asset (Relative to your mod directory and without extension) used for the modification.</param>
 /// <param name="destination">The area you wish to replace.</param>
 /// <param name="source">The area you wish to use for replacement, if omitted the full patch texture is used.</param>
 public static void RegisterTexturePatch(this IContentHelper helper, string assetName, string patchAssetName, Rectangle?destination = null, Rectangle?source = null)
 {
     helper.RegisterTexturePatch(assetName, helper.Load <Texture2D>(patchAssetName), destination, source);
 }