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

GetBackgroundSlot() public static method

public static GetBackgroundSlot ( string texture ) : int
texture string
return int
		public static int GetBackgroundSlot(string texture)
		{
			if (backgrounds.ContainsKey(texture))
			{
				return backgrounds[texture];
			}
			else
			{
				return -1;
			}
		}

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Gets the texture slot corresponding to the specified texture name. Shorthand for calling BackgroundTextureLoader.GetBackgroundSlot(this.Name + '/' + name).
 /// </summary>
 /// <param name="name">The name.</param>
 /// <returns></returns>
 public int GetBackgroundSlot(string name) => BackgroundTextureLoader.GetBackgroundSlot(Name + '/' + name);
All Usage Examples Of Terraria.ModLoader.BackgroundTextureLoader::GetBackgroundSlot