Esempio n. 1
0
 public void RemoveGui()
 {
     if (parentGuiView != null)
     {
         parentGuiView = null;
         UnityEngine.Object.Destroy(guiPanel);
         guiPanel = null;
     }
     isGuiRunning = false;
 }
Esempio n. 2
0
        public void SetupGui()
        {
            Loader.parentGuiView = null;
            Loader.parentGuiView = UIView.GetAView();

            if (Loader.guiPanel == null)
            {
                Loader.guiPanel = (SwitchUI)Loader.parentGuiView.AddUIComponent(typeof(SwitchUI));
            }
            isGuiRunning = true;
        }
Esempio n. 3
0
        private void CreateRoot()
        {
            _SwitchUIGO          = new GameObject("SwitchUI");
            _SwitchUI            = _SwitchUIGO.AddComponent <SwitchUI>();
            _SwitchUI.OpenColor  = new Color(0.2f, 0.8f, 0.2f, 0.6f);
            _SwitchUI.CloseColor = new Color(0.5f, 0.5f, 0.5f, 0.8f);
            RectTransform rootTransform = _SwitchUIGO.AddComponent <RectTransform>();

            rootTransform.sizeDelta = new Vector2(100, 50);
            Image image = _SwitchUIGO.AddComponent <Image>();

            image.color          = new Color(1, 1, 1, 1);
            _SwitchUI.Interval_1 = new Vector2(4, 4);
            _SwitchUI.Interval_2 = new Vector2(2, 2);
            CreateBG();
            CreateCell();
        }