本文整理汇总了C#中MenuButton.AttachProperty方法的典型用法代码示例。如果您正苦于以下问题:C# MenuButton.AttachProperty方法的具体用法?C# MenuButton.AttachProperty怎么用?C# MenuButton.AttachProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MenuButton
的用法示例。
在下文中一共展示了MenuButton.AttachProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SelectOptionsMenu
private void SelectOptionsMenu()
{
const string LONG_BUTTON_BACKGROUND_PATH = "Sprites/UI/Menu/longButtonBackground";
buttonTexture = GameResources.Content.Load<Texture2D>(LONG_BUTTON_BACKGROUND_PATH);
isInMenuRoot = false;
MenuButton soundMenuEntry = new MenuButton("sound", new Vector2(55, -2), 0, 0, this);
soundMenuEntry.AttachProperty((int)SystemSettings.Sound, "on", "off");
MenuButton vibrationMenuEntry = new MenuButton("vibration", new Vector2(5, -2), 1, 0, this);
vibrationMenuEntry.AttachProperty((int)SystemSettings.Vibration, "on", "off");
MenuButton backMenuEntry = new MenuButton("back", new Vector2(90, -2), 2, 0, this);
backMenuEntry.Selected += BackMenuEntrySelected;
// Add entries to the menu.
menuEntries.Clear();
menuEntries.Add(soundMenuEntry);
menuEntries.Add(vibrationMenuEntry);
menuEntries.Add(backMenuEntry);
}