Esempio n. 1
0
        /// <summary>
        /// 调用可配置的 UI 交互表现方法
        /// 如:UI 音效,UI 特效
        /// </summary>
        protected virtual void InvokeConfigurableInteractDisplay(ILegoControl control)
        {
            if (!interactable)
            {
                return;
            }
            var appConfigurableInteractDisplay = Injector.Instance.Get <ILegoUIInteractDisplay>();

            appConfigurableInteractDisplay.Display(control);
        }
Esempio n. 2
0
 private void ExecuteOneMetamorphose()
 {
     buildingControl.Metamorphose(TaskMeta);
     BuildedCount++;
     BuildedFrameCount++;
     if (buildingControl.MetamorphoseStage == LegoMetamorphoseStage.Completed)
     {
         MountControl();
         buildingControl.GameObject.SetActive(buildingControl.RectMeta.IsDefaultActive);
         buildingControl = null;
     }
 }
Esempio n. 3
0
        private void AddControl(ILegoControl control)
        {
            if (controlDict.ContainsKey(control.Name))
            {
#if DEBUG || DEBUG
                //YuDebugUtility.LogError($"控件{control.Name}已添加!");
#endif
                return;
            }

            controlDict.Add(control.Name, control);
            Controls.Add(control);
        }
Esempio n. 4
0
 public void Reset()
 {
     buildAble            = false;
     IsComplete           = false;
     BuildedCount         = 0;
     m_BuildSpeed         = 0;
     buildingControl      = null;
     ComponentMountMeta   = null;
     containerBuildedNum  = 0;
     sonBuildedNum        = 0;
     m_ParentTask         = null;
     UiBuildCallback      = null;
     IsBindRxModelOnBuild = true;
     IsInBackground       = false;
     ParentRect           = null;
 }
Esempio n. 5
0
 public void UnBinding()
 {
     m_Control      = null;
     OnValueChanged = null;
 }
Esempio n. 6
0
 public virtual void BindingControl(ILegoControl control, Action <T> onVChanged)
 {
     m_Control      = control;
     OnValueChanged = onVChanged;
     OnValueChanged?.Invoke(m_Value);
 }
Esempio n. 7
0
        private void GetNextControlAtEditor()
        {
            switch (buildingType)
            {
            case LegoUIType.Text:
                buildingControl = GetControlByDefaultControls <YuLegoText>();
                break;

            case LegoUIType.Image:
                buildingControl = GetControlByDefaultControls <YuLegoImage>();
                break;

            case LegoUIType.RawImage:
                buildingControl = GetControlByDefaultControls <YuLegoRawImage>();
                break;

            case LegoUIType.Button:
                buildingControl = GetControlByDefaultControls <YuLegoButton>();
                break;

            case LegoUIType.TButton:
                buildingControl = GetControlByDefaultControls <YuLegoTButton>();
                break;

            case LegoUIType.Toggle:
                buildingControl = GetControlByDefaultControls <YuLegoToggle>();
                break;

            case LegoUIType.PlaneToggle:
                buildingControl = GetControlByDefaultControls <YuLegoPlaneToggle>();
                break;

            case LegoUIType.InputField:
                buildingControl = GetControlByDefaultControls <YuLegoInputField>();
                break;

            case LegoUIType.Slider:
                buildingControl = GetControlByDefaultControls <YuLegoSlider>();
                break;

            case LegoUIType.Progressbar:
                buildingControl = GetControlByDefaultControls <YuLegoProgressbar>();
                break;

            case LegoUIType.Tab:
                break;

            case LegoUIType.Dropdown:
                buildingControl = GetControlByDefaultControls <YuLegoDropdown>();
                break;

            case LegoUIType.Rocker:
                buildingControl = GetControlByDefaultControls <YuLegoRocker>();
                break;

            case LegoUIType.Grid:
                break;

            case LegoUIType.ScrollView:
                buildingControl = GetControlByDefaultControls <YuLegoScrollView>();
                break;

            case LegoUIType.None:
                break;

            case LegoUIType.View:
                break;

            case LegoUIType.InlineText:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 8
0
        private void GetNextControlAtPlay()
        {
            switch (buildingType)
            {
            case LegoUIType.Text:
                buildingControl = textPool.Take();
                break;

            case LegoUIType.Image:
                buildingControl = imagePool.Take();
                break;

            case LegoUIType.RawImage:
                buildingControl = rawImagePool.Take();
                break;

            case LegoUIType.Button:
                buildingControl = buttonPool.Take();
                break;

            case LegoUIType.TButton:
                buildingControl = tButtonPool.Take();
                break;

            case LegoUIType.Toggle:
                buildingControl = togglePool.Take();
                break;

            case LegoUIType.PlaneToggle:
                buildingControl = planeTogglePool.Take();
                break;

            case LegoUIType.InputField:
                buildingControl = inputFieldPool.Take();
                break;

            case LegoUIType.Slider:
                buildingControl = sliderPool.Take();
                break;

            case LegoUIType.Progressbar:
                buildingControl = progressbarPool.Take();
                break;

            case LegoUIType.Tab:
                break;

            case LegoUIType.Dropdown:
                buildingControl = dropdownPool.Take();
                break;

            case LegoUIType.Rocker:
                buildingControl = rockerPool.Take();
                break;

            case LegoUIType.Grid:
                break;

            case LegoUIType.ScrollView:
                buildingControl = scrollViewPool.Take();
                break;

            case LegoUIType.None:
                break;

            case LegoUIType.View:
                break;

            case LegoUIType.InlineText:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }