当前位置: 首页>>代码示例>>C#>>正文


C# UIManager类代码示例

本文整理汇总了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);
        }
开发者ID:adamxi,项目名称:SharpDXFramework,代码行数:26,代码来源:MainTestScene.cs

示例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;
 }
开发者ID:christiansax,项目名称:MoCap,代码行数:7,代码来源:uc_Survey.cs

示例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();

	}
开发者ID:frodillo2,项目名称:volcano,代码行数:27,代码来源:GameManager.cs

示例4: EZGUIPointerDisablePatcher

 private EZGUIPointerDisablePatcher()
 {
     mManager = UIManager.instance;
     mUsedPointers = (bool[])typeof(UIManager).GetField("usedPointers",
         BindingFlags.NonPublic | BindingFlags.Instance).GetValue(UIManager.instance);
     mManager.AddMouseTouchPtrListener(EZGUIMouseTouchPtrListener);
 }
开发者ID:Kevin-010,项目名称:RemoteTech2,代码行数:7,代码来源:EZGUIPointerDisablePatcher.cs

示例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();
 }
开发者ID:dmoonfire,项目名称:wordplay,代码行数:10,代码来源:ViewerEntry.cs

示例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";
 }
开发者ID:ThuCommix,项目名称:Sharpex2D,代码行数:11,代码来源:MenuButton.cs

示例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>();
 }
开发者ID:gunman7840,项目名称:Test_Win,代码行数:8,代码来源:WeaponRadius.cs

示例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;
            }
        }
    }
开发者ID:DoucheBagMIKE,项目名称:DarkZeldaUnity,代码行数:26,代码来源:InventoryUIManager.cs

示例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();
 }
开发者ID:dmoonfire,项目名称:wordplay,代码行数:10,代码来源:Demo.cs

示例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> ();
	}
开发者ID:joshmond,项目名称:SurvivalHorror,代码行数:7,代码来源:Slot.cs

示例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>();
 }
开发者ID:kidaa,项目名称:ProjectUniverse,代码行数:16,代码来源:NewGamePanelManager.cs

示例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);
     }
 }
开发者ID:KrissLaCross,项目名称:BreakOut,代码行数:33,代码来源:UIGridMenu.cs

示例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);
     }
 }
开发者ID:Dinendal1er,项目名称:Gomoku,代码行数:27,代码来源:OptionUIManager.cs

示例14: Start

 void Start()
 {
     uim = uiMObj.GetComponent<UIManager> ();
     bc = bmObj.GetComponent<BuildControls> ();
     dc = dmObj.GetComponent<DestroyControls> ();
     changeMode (mode);
 }
开发者ID:alex-zhang-ayz,项目名称:volume_test,代码行数:7,代码来源:ModeController.cs

示例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);
 }
开发者ID:christiansax,项目名称:MoCap,代码行数:7,代码来源:uc_Project.cs


注:本文中的UIManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。