Пример #1
0
 new void Start()
 {
     base.Start();
     if (gameObject.childrenOnly().Count > 0)
     {
         clock = gameObject.childrenOnly()[0].GetComponent <DragClock>();
     }
     startPos = gameObject.transform.position;
 }
Пример #2
0
        public static void ShowInterface(bool state)
        {
            Initialize();
            if (IsInterfaceVisible == state)
            {
                return;
            }

            _customizeButton.Caption = state ? "Save & Close" : "Customize UI";
            //destroying a Component and then adding the same Component can crash the game.
            var collider = _customizeButton.Child("Collider");

            if (state)
            {
                if (_customizeButton.HasComponent <UIDragObject>())
                {
                    collider.SetBehaviors <UIDragObject>(true);
                }
                else
                {
                    collider.AddComponent <UIDragObject>().target = _customizeButton.GameObject.transform;
                }
            }
            else
            {
                collider.SetBehaviors <UIDragObject>(false);
            }
            if (state && !IsInterfaceCreated)
            {
                CreateInterface();
                return;
            }

            TooltipOffsetCheckbox.SetActive(state);
            DragPartyBar.SetActive(state);
            DragHugBgr.SetActive(state);
            DragLog.SetActive(state);
            DragAbilitiesBar.SetActive(state);
            ToggleLogButtons.SetActive(state);
            ToggleHudOrientation.SetActive(state);
            DragHudPanelLeft.SetActive(state);
            DragHudPanelRight.SetActive(state);
            DragClock.SetActive(state);
            ToggleHudBgr.SetActive(state);
            TogglePartyOrientation.SetActive(state);
            ToggleBuffsSide.SetActive(state);
            DragFormationBar.SetActive(state);
            FrameDropdown.SetActive(state);
            ToggleButtonsBgr.SetActive(state);
            TogglePortraitHighlights.SetActive(state);
            ToggleCustomTextures.SetActive(state);
            SaveBtn.SetActive(state);
            CancelBtn.SetActive(state);
            UseDefaultUIBtn.SetActive(state);
        }
Пример #3
0
 new void Start()
 {
     base.Start();
     if (gameObject.childrenOnly().Count > 0) clock = gameObject.childrenOnly()[0].GetComponent<DragClock>();
     startPos = gameObject.transform.position;
 }