static private ReserveBackgroundSlot ( ) : int | ||
Результат | int |
internal static int ReserveBackgroundSlot()
{
int reserve = nextBackground;
nextBackground++;
return reserve;
}
/// <summary> /// Adds a texture to the list of background textures and assigns it a background texture slot. /// </summary> /// <param name="texture">The texture.</param> public void AddBackgroundTexture(string texture) { if (!loading) { throw new Exception("AddBackgroundTexture can only be called from Mod.Load or Mod.Autoload"); } BackgroundTextureLoader.backgrounds[texture] = BackgroundTextureLoader.ReserveBackgroundSlot(); ModContent.GetTexture(texture); }