public void SetFocusUnitIcon2FocusSurface()
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            UICommandUnitIcon       focusUnitIcon           = prodBattleCommandSelect.commandUnitList.focusUnitIcon;

            this._listCommandSurface.get_Item(this.selectIndex).SetCommandUnit(focusUnitIcon);
        }
Exemplo n.º 2
0
        protected override void OnDragDropMove(Vector2 delta)
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            List <UICommandSurface> listCommandSurfaces     = prodBattleCommandSelect.commandBox.listCommandSurfaces;
            UICommandSurface        mainTarget = (from x in listCommandSurfaces
                                                  orderby(x.transform.position - base.transform.position).magnitude
                                                  select x).First();

            ChkBorderLine();
            listCommandSurfaces.ForEach(delegate(UICommandSurface x)
            {
                if (x == mainTarget)
                {
                    x.ChkSurfaceMagnifyDistance(this);
                }
                else
                {
                    x.Reduction();
                }
            });
            if (!mainTarget.isAbsorded)
            {
                base.OnDragDropMove(delta);
            }
        }
Exemplo n.º 3
0
        public void AbsodedUnitIcon2FocusSurface()
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            UICommandUnitIcon       focusUnitIcon           = prodBattleCommandSelect.commandUnitList.focusUnitIcon;

            _listCommandSurface[selectIndex].Absorded(focusUnitIcon);
        }
Exemplo n.º 4
0
 protected override void OnDragDropRelease(GameObject surface)
 {
     if (surface != null)
     {
         List <UICommandSurface> list = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect.commandBox.listCommandSurfaces.FindAll((UICommandSurface x) => x.isAbsorded);
         if (list != null && list.get_Count() != 0)
         {
             list.get_Item(0).SetCommandUnit(this);
         }
     }
     base.OnDragDropRelease(surface);
     this.Reset();
 }
Exemplo n.º 5
0
        private void ChkBorderLine()
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            float unitIconLabelDrawBorderLineLocalPosX      = prodBattleCommandSelect.commandUnitList.unitIconLabelDrawBorderLineLocalPosX;

            if (base.get_transform().get_localPosition().x < unitIconLabelDrawBorderLineLocalPosX && !this._isBorderOrver)
            {
                this._isBorderOrver = true;
                this.isActiveIcon   = false;
            }
            else if (base.get_transform().get_localPosition().x >= unitIconLabelDrawBorderLineLocalPosX && this._isBorderOrver)
            {
                this._isBorderOrver = false;
                this.isActiveIcon   = true;
            }
        }
Exemplo n.º 6
0
        private void ChkBorderLine()
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            float   unitIconLabelDrawBorderLineLocalPosX    = prodBattleCommandSelect.commandUnitList.unitIconLabelDrawBorderLineLocalPosX;
            Vector3 localPosition = base.transform.localPosition;

            if (localPosition.x < unitIconLabelDrawBorderLineLocalPosX && !_isBorderOrver)
            {
                _isBorderOrver = true;
                isActiveIcon   = false;
                return;
            }
            Vector3 localPosition2 = base.transform.localPosition;

            if (localPosition2.x >= unitIconLabelDrawBorderLineLocalPosX && _isBorderOrver)
            {
                _isBorderOrver = false;
                isActiveIcon   = true;
            }
        }
Exemplo n.º 7
0
        protected override void OnDragDropMove(Vector2 delta)
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            List <UICommandSurface> listCommandSurfaces     = prodBattleCommandSelect.commandBox.listCommandSurfaces;
            UICommandSurface        mainTarget = Enumerable.First <UICommandSurface>(Enumerable.OrderBy <UICommandSurface, float>(listCommandSurfaces, (UICommandSurface x) => (x.get_transform().get_position() - this.get_transform().get_position()).get_magnitude()));

            this.ChkBorderLine();
            listCommandSurfaces.ForEach(delegate(UICommandSurface x)
            {
                if (x == mainTarget)
                {
                    x.ChkSurfaceMagnifyDistance(this);
                }
                else
                {
                    x.Reduction();
                }
            });
            if (!mainTarget.isAbsorded)
            {
                base.OnDragDropMove(delta);
            }
        }