Terraria.ModLoader.BackgroundTextureLoader.ResizeAndFillArrays C# (CSharp) Method

ResizeAndFillArrays() static private method

static private ResizeAndFillArrays ( ) : void
return void
		internal static void ResizeAndFillArrays()
		{
			Array.Resize(ref Main.backgroundTexture, nextBackground);
			Array.Resize(ref Main.backgroundHeight, nextBackground);
			Array.Resize(ref Main.backgroundWidth, nextBackground);
			Array.Resize(ref Main.backgroundLoaded, nextBackground);
			foreach (string texture in backgrounds.Keys)
			{
				int slot = backgrounds[texture];
				Main.backgroundTexture[slot] = ModLoader.GetTexture(texture);
				Main.backgroundWidth[slot] = Main.backgroundTexture[slot].Width;
				Main.backgroundHeight[slot] = Main.backgroundTexture[slot].Height;
				Main.backgroundLoaded[slot] = true;
			}
		}

Usage Example

Exemplo n.º 1
0
 private static void ResizeArrays(bool unloading = false)
 {
     ItemLoader.ResizeArrays(unloading);
     EquipLoader.ResizeAndFillArrays();
     ModPrefix.ResizeArrays();
     Main.InitializeItemAnimations();
     ModDust.ResizeArrays();
     TileLoader.ResizeArrays(unloading);
     WallLoader.ResizeArrays(unloading);
     ProjectileLoader.ResizeArrays();
     NPCLoader.ResizeArrays(unloading);
     NPCHeadLoader.ResizeAndFillArrays();
     ModGore.ResizeAndFillArrays();
     SoundLoader.ResizeAndFillArrays();
     MountLoader.ResizeArrays();
     BuffLoader.ResizeArrays();
     PlayerHooks.RebuildHooks();
     BackgroundTextureLoader.ResizeAndFillArrays();
     UgBgStyleLoader.ResizeAndFillArrays();
     SurfaceBgStyleLoader.ResizeAndFillArrays();
     GlobalBgStyleLoader.ResizeAndFillArrays(unloading);
     WaterStyleLoader.ResizeArrays();
     WaterfallStyleLoader.ResizeArrays();
     WorldHooks.ResizeArrays();
     foreach (LocalizedText text in LanguageManager.Instance._localizedTexts.Values)
     {
         text.Override = null;
     }
 }
All Usage Examples Of Terraria.ModLoader.BackgroundTextureLoader::ResizeAndFillArrays