本文整理匯總了C#中Terraria.Main.LoadBackground方法的典型用法代碼示例。如果您正苦於以下問題:C# Main.LoadBackground方法的具體用法?C# Main.LoadBackground怎麽用?C# Main.LoadBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Terraria.Main
的用法示例。
在下文中一共展示了Main.LoadBackground方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TerraCustomMenu
//.........這裏部分代碼省略.........
for (int num49 = 0; num49 < numberClickableLabels; num49++)
{
clickableLabelScale[num49] = 0.73f;
}
int num50 = 0;
clickableLabelText[num50] = "Reset Background Settings";
if (main.selectedMenu == 0)
{
Setting.initializeBGs();
}
clickableLabelScale[0] = 0.53f;
array4[0] = -17;
num50++;
if (Main.setting.ForestStyle == 14)
{
clickableLabelText[num50] = "Forest Background: Random";
}
else
{
// 0 to 13?
clickableLabelText[num50] = "Forest Background: " + (Main.setting.ForestStyle + 1);
}
if (main.selectedMenu == num50)
{
if (Main.setting.ForestStyle == 14)
{
Main.setting.ForestStyle = 0;
}
else
{
Main.setting.ForestStyle++;
}
TerraCustomUtils.findBackgrounds(0, Main.setting.ForestStyle);
main.LoadBackground(Main.treeMntBG[0]);
main.LoadBackground(Main.treeMntBG[1]);
main.LoadBackground(Main.treeBG[0]);
main.LoadBackground(Main.treeBG[1]);
main.LoadBackground(Main.treeBG[2]);
}
if (main.selectedMenu2 == num50)
{
if (Main.setting.ForestStyle == 0)
{
Main.setting.ForestStyle = 14;
}
else
{
Main.setting.ForestStyle--;
}
TerraCustomUtils.findBackgrounds(0, Main.setting.ForestStyle);
main.LoadBackground(Main.treeMntBG[0]);
main.LoadBackground(Main.treeMntBG[1]);
main.LoadBackground(Main.treeBG[0]);
main.LoadBackground(Main.treeBG[1]);
main.LoadBackground(Main.treeBG[2]);
}
num50++;
if (Main.setting.CorruptStyle == 2)
{
clickableLabelText[num50] = "Corrupt Background: Random";
}
else
{
clickableLabelText[num50] = "Corrupt Background: " + (Main.setting.CorruptStyle + 1);
}
if (main.selectedMenu == num50)
示例2: PreviewDrawAll
private static void PreviewDrawAll(Main main, int[] v)
{
for (int i = 0; i < v.GetLength(0); i++)
{
main.LoadBackground(v[i]);
PreviewDraw(Main.backgroundTexture[v[i]], i);
}
}