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

            this._listCommandSurface.get_Item(this.selectIndex).SetCommandUnit(focusUnitIcon);
        }
예제 #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);
            }
        }
예제 #3
0
        public void AbsodedUnitIcon2FocusSurface()
        {
            ProdBattleCommandSelect prodBattleCommandSelect = BattleTaskManager.GetTaskCommand().prodBattleCommandSelect;
            UICommandUnitIcon       focusUnitIcon           = prodBattleCommandSelect.commandUnitList.focusUnitIcon;

            _listCommandSurface[selectIndex].Absorded(focusUnitIcon);
        }
예제 #4
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;
            }
        }
예제 #5
0
 protected override bool Init()
 {
     _prodBattleCommandSelect = ProdBattleCommandSelect.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdBattleCommandSelect).GetComponent <ProdBattleCommandSelect>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, BattleTaskManager.GetBattleManager().GetCommandPhaseModel());
     _clsRationModel          = BattleTaskManager.GetBattleManager().GetRationModel();
     if (_clsRationModel != null)
     {
         _prodCombatRation = ProdCombatRation.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdCombatRation).GetComponent <ProdCombatRation>(), BattleTaskManager.GetBattleCameras().cutInCamera.transform, _clsRationModel);
         _prodCombatRation.Play(OnCombatRationFinished);
         ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();
         observerAction.Register(delegate
         {
             Mem.DelComponentSafe(ref _prodCombatRation);
         });
     }
     else
     {
         OnCombatRationFinished();
     }
     return(true);
 }
예제 #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;
            }
        }
예제 #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);
            }
        }