示例#1
0
        private void HandIdle(GameObject arg1, int arg2)
        {
            if (_handIndex != arg2)
            {
                return;
            }

            KGUI_BackPackMark equ = arg1.GetComponent <KGUI_BackPackMark>();

            if (equ == null)
            {
                return;
            }

            if (!_isHandOnBag)
            {
                //SetObjectFrontUI(true);
                equ.ObjectFrontUI.OnReset();
                //释放时,离开背包的
                _handIndex = -1;

                return;
            }

            _handIndex = -1;

            //不支持组合删除
            if (!equ.IsFeaturesObjectEquals())
            {
                equ.ObjectFrontUI.OnReset();
                return;
            }

            if (!equ.IsCanPutInBag())
            {
                equ.ObjectFrontUI.OnReset();
                return;
            }

            DestroyEquipment(equ);


            //KGUI_BackPackMark[] equs;
            //equs = arg1.GetComponentsInChildren<KGUI_BackPackMark>();

            ////在背包里边松手
            //if (equs != null)
            //{
            //    for (int i = 0; i < equs.Length; i++)
            //    {

            //        //不满足条件 跳过
            //        if (!equs[i].IsCanPutInBag()) continue;

            //        //调用删除
            //        DestroyEquipment(equs[i]);
            //    }
            //    equs = null;
            //}
        }
示例#2
0
        private void HandIdle(GameObject arg1, int arg2)
        {
            if (_handIndex != arg2)
            {
                return;
            }

            KGUI_BackPackMark equ = arg1.GetComponent <KGUI_BackPackMark>();

            if (equ == null)
            {
                return;
            }

            if (!_isHandOnBag)
            {
                //SetObjectFrontUI(true);
                equ.ObjectFrontUI.OnReset();
                //释放时,离开背包的
                _handIndex = -1;

                return;
            }

            _handIndex = -1;

            //不支持组合删除
            if (!equ.IsFeaturesObjectEquals())
            {
                equ.ObjectFrontUI.OnReset();
                return;
            }

            if (!equ.IsCanPutInBag())
            {
                equ.ObjectFrontUI.OnReset();
                return;
            }

            DestroyEquipment(equ);
        }