本文整理汇总了C#中MenuButton.SetDraw方法的典型用法代码示例。如果您正苦于以下问题:C# MenuButton.SetDraw方法的具体用法?C# MenuButton.SetDraw怎么用?C# MenuButton.SetDraw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuButton
的用法示例。
在下文中一共展示了MenuButton.SetDraw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TutorialMiningLaserMenu
public TutorialMiningLaserMenu(Rect area)
{
a = area;
float xOff = a.width * 0.90f;
float yOff = a.height * 0.95f;
float btnWidth = a.width - xOff*1.01f;
float btnHeight = a.height - yOff*1.001f;
Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);
pb = new MenuButton(btnrec, "buy", ButtonPressed);
pb.SetDraw(true);
}
示例2: TutorialWeaponMenu
public TutorialWeaponMenu(Rect area)
{
a = area;
tmlm = new TutorialMiningLaserMenu(new Rect(a.x + a.width, a.y, Screen.width - (a.x + a.width), a.height));
tmlm.SetDraw(false);
float xOff = 0.0f;
float yOff = 0.0f;
float btnWidth = a.width - 2*xOff;
float btnHeight = 0.05f * a.height;
Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);
mlb = new MenuButton(btnrec, "mining laser", ButtonPressed);
mlb.SetDraw(true);
}
示例3: TutorialMenu
public TutorialMenu (Rect area)
{
a = area;
wm = new TutorialWeaponMenu(new Rect(a.width, 0, a.width, a.height));
wm.SetDraw(false);
float xOff = 0.0f;//0.15f * a.width;
float yOff = 0.0f;//0.02f * a.height;
float btnWidth = a.width - 2*xOff;
float btnHeight = 0.05f * a.height;
Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);
weapBtn = new MenuButton(btnrec, "weapons", ButtonPressed);
weapBtn.SetDraw(true);
btnrec = new Rect(btnrec.x, btnrec.y + btnHeight + yOff, btnWidth, btnHeight);
exitBtn = new MenuButton(btnrec, "exit", ButtonPressed);
exitBtn.SetDraw(true);
}