本文整理汇总了C#中UIManager类的典型用法代码示例。如果您正苦于以下问题:C# UIManager类的具体用法?C# UIManager怎么用?C# UIManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIManager类属于命名空间,在下文中一共展示了UIManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
public override void LoadContent()
{
base.LoadContent();
cam = new Camera(GraphicsDevice);
uiManager = new UIManager();
//uiManager.EnableProfilling = true;
var menuPanel = new UIPanel();
menuPanel.AddConstraint(Edge.CenterXY, null, Edge.CenterXY);
menuPanel.Alpha = 0f;
var testScenesButton = GetMenuEntry(menuPanel, "UI Test Scenes");
testScenesButton.InputReleased += testScenes;
menuPanel.AddChild(testScenesButton);
var transitionScenesButton = GetMenuEntry(menuPanel, "Transition Test Scenes");
transitionScenesButton.InputReleased += TransitionScenesButton_InputReleased;
menuPanel.AddChild(transitionScenesButton);
var exitButton = GetMenuEntry(menuPanel, "Exit");
exitButton.InputReleased += ExitButton_InputReleased;
menuPanel.AddChild(exitButton);
uiManager.Add(menuPanel);
}
示例2: UnRegisterEvents
public void UnRegisterEvents(UIManager pEventHandler)
{
btn_CreateOptions.Click -= pEventHandler.SurveyButtonClicked;
btn_Edit.Click -= pEventHandler.SurveyButtonClicked;
btn_New.Click -= pEventHandler.SurveyButtonClicked;
btn_Vote.Click -= pEventHandler.SurveyButtonClicked;
}
示例3: Start
IEnumerator Start(){
soundManager=SoundManager._instance;
uiManager=UIManager._instance;
saveDataManager=SaveDataManager.instance_;
volcanoEyeManager=VolcanoEyeManager._instance;
endText.SetActive(false);
yield return new WaitForSeconds (0.5f);
while( true ){
if (Input.GetMouseButtonDown (0)) {
print("preiosno");
break;
}
yield return 0;
}
instance = this;
for( int i = 0; i < spawnPointsParent.transform.childCount; i++){
spawnPoints.Add( spawnPointsParent.transform.GetChild(i));
}
currentLives = lives;
personPrefab = Resources.Load ("PersonPrefab") as GameObject;
loadGame();
}
示例4: EZGUIPointerDisablePatcher
private EZGUIPointerDisablePatcher()
{
mManager = UIManager.instance;
mUsedPointers = (bool[])typeof(UIManager).GetField("usedPointers",
BindingFlags.NonPublic | BindingFlags.Instance).GetValue(UIManager.instance);
mManager.AddMouseTouchPtrListener(EZGUIMouseTouchPtrListener);
}
示例5: ViewerEntry
/// <summary>
/// Constructs a demo object with the appropriate gui.
/// </summary>
public ViewerEntry()
: base("Moonfire Games' Gtk ViewerEntry")
{
// Build the GUI
uiManager = new UIManager();
CreateGui();
}
示例6: MenuButton
/// <summary>
/// Initializes a new MenuButton class.
/// </summary>
/// <param name="assignedUIManager">The AssignedUIManager.</param>
public MenuButton(UIManager assignedUIManager)
: base(assignedUIManager)
{
Size = new UISize(300, 30);
_font = new Font("Segoe UI", 16, TypefaceStyle.Bold);
Text = "MenuButton1";
}
示例7: Awake
// private int angle = 0;
void Awake()
{
gm = gameObject;
tr = transform;
_camera = GameObject.Find("Main Camera").GetComponent<Camera>();
uimanager = GameObject.Find("UIManager").GetComponent<UIManager>();
}
示例8: OnEnable
void OnEnable()
{
if(initalized == false)
{
UI = GameObject.FindGameObjectWithTag("GameManager").GetComponent<UIManager>();
inventory = GameObject.FindGameObjectWithTag("Player").GetComponent<Inventory>();
itemsPanel = gameObject.transform.FindChild("ItemsPanel");
initalized = true;
}
if (UI.ActiveMenu != "InventoryUI")
{
this.enabled = false;
return;
}
for (int i = 0; i < itemsPanel.childCount - 2; i++)
{
if (i <= inventory.items.Count - 1)
{
GameObject inventorySlot = itemsPanel.GetChild(i).gameObject;
Sprite icon = inventory.items[i].uiTexture;
inventorySlot.GetComponent<Image>().overrideSprite = icon;
}
}
}
示例9: Demo
/// <summary>
/// Constructs a demo object with the appropriate gui.
/// </summary>
public Demo()
: base("Moonfire Games' Gtk Demo")
{
// Build the GUI
uiManager = new UIManager();
CreateGui();
}
示例10: Awake
void Awake()
{
itemIcon = gameObject.transform.GetChild (0).GetComponent<Image> ();
inventory = GameObject.FindGameObjectWithTag ("UI").transform.GetChild (1).GetComponent<PlayerInventory> ();
manager = GameObject.FindGameObjectWithTag ("UI").GetComponent<UIManager> ();
itemInformation = GameObject.FindGameObjectWithTag ("UI").transform.GetChild (1).GetChild (0).GetComponent<ItemInformation> ();
}
示例11: Start
/// <summary>
/// Unity START
/// </summary>
/// <remarks>
/// <para>
/// Set up references to MainMenuController (MMC) and UIController (UIC), and get
/// the NewGameManager (MMC) and UIManager (UIC) components.
/// </para>
/// </remarks>
void Start()
{
GameObject mmc = GameObject.Find("MainMenuController");
GameObject uic = GameObject.Find("UIController");
ngm = mmc.GetComponent<NewGameManager>();
uim = uic.GetComponent<UIManager>();
}
示例12: HandleInput
public override void HandleInput(UIManager manager) {
if (manager.Right.Pressed) {
MenuGrid.X += 1;
}
if (manager.Left.Pressed) {
MenuGrid.X -= 1;
}
if (manager.Down.Pressed) {
MenuGrid.Y += 1;
}
if (manager.Up.Pressed) {
MenuGrid.Y -= 1;
}
for (var i = 0; i < MenuItems.Count; i++) {
if (MenuGrid == i) {
MenuItems[i].Highlight();
}
else {
MenuItems[i].Dim();
}
}
if (manager.A.Pressed) {
if (CurrentMenuItem is UIMenu) {
manager.Activate(CurrentMenuItem);
}
else {
Trigger();
}
}
else if (manager.B.Pressed) {
CancelAndDeactivate(manager);
}
}
示例13: Start
// Use this for initialization
void Start()
{
try
{
MusicLevel = GameObject.Find("Music Slider").GetComponent<Slider>();
if (MusicLevel == null)
throw new NullReferenceException("Missing Music Slider");
EffectLevel = GameObject.Find("Effect Slider").GetComponent<Slider>();
if (EffectLevel == null)
throw new NullReferenceException("Missing Effect Slider");
MusicLevel.value = OptionManager.getInstance().getMusicLevel();
EffectLevel.value = OptionManager.getInstance().getEffectLevel();
UM = UIManager.getInstance();
if (UM == null)
throw new NullReferenceException("Missing the UIManager");
sm = SoundManager.getInstance();
if (sm == null)
throw new NullReferenceException("Missing SoundManager");
}
catch (Exception e)
{
ErrorUI.error = e.Message;
LevelManager.getInstance().LoadLevel("Error");
Destroy(gameObject.transform.parent.gameObject);
}
}
示例14: Start
void Start()
{
uim = uiMObj.GetComponent<UIManager> ();
bc = bmObj.GetComponent<BuildControls> ();
dc = dmObj.GetComponent<DestroyControls> ();
changeMode (mode);
}
示例15: RegisterEvents
public void RegisterEvents(UIManager pManagerInstance)
{
btn_Create.Click += new EventHandler(pManagerInstance.ProjectButtonClicked);
btn_Update.Click += new EventHandler(pManagerInstance.ProjectButtonClicked);
btn_InviteUser.Click += new EventHandler(pManagerInstance.ProjectButtonClicked);
btn_ChangeOwner.Click += new EventHandler(pManagerInstance.ProjectButtonClicked);
}