本文整理汇总了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);
}
}