Esempio n. 1
0
    void ItemMoveEnd(GameObject obj, Vector2 pos)
    {
        if (objMove == null || !isMove)
        {
            return;
        }
        int index = GetIndexOfItem(obj);


        if (objMove != null)
        {
            objMove.gameObject.SetActive(false);
            objMove.transform.localPosition = Vector3.zero;
        }

        int dst = CheckInBackPackage();

        if (dst != -1 && index != -1 && dst != index)
        {
            SelectSelfCloseOtherSelect(this, -1);
            HolyGameLogic.Instance.EmsgToss_AskMoveGoods(index, dst);
        }
        else
        {
            OnShowItemInUserInterface();
            SelectSelfCloseOtherSelect(this, -1);
        }
        if (SelectIndex != null && SelectIndex.Count != 0 && SelectIndex.ContainsKey(UIShop.ShopSelectType.TypeUser))
        {
            SelectIndex.Clear();
        }
        isMove  = false;
        objMove = null;
    }
Esempio n. 2
0
 /// <summary>
 /// キー入力に応じてインデックスを変更する
 /// </summary>
 /// <param name="upKeyIn">上のキーが押されたかどうか</param>
 /// <param name="downKeyIn">>下のキーが押されたかどうか</param>
 private void ChangeIndex(bool upKeyIn, bool downKeyIn)
 {
     // 上だけ押されてたら
     if (upKeyIn == true)
     {
         selectIndex--;
     }
     // 下だけ押されてたら
     if (downKeyIn == true)
     {
         selectIndex++;
     }
     // 範囲内に収める
     if (selectIndex < 0)
     {
         selectIndex = SelectIndex.MAX - 1;
     }
     else if (selectIndex >= SelectIndex.MAX)
     {
         selectIndex = 0;
     }
     if (upKeyIn != downKeyIn)
     {
         // 音量を変更
         audioSource.volume = 0.25f;
         // 音源をセット
         audioSource.clip = selectClip;
         // 選択音の再生
         audioSource.Play();
     }
 }
Esempio n. 3
0
    protected override void OnButtonClickFunc(int ie)
    {
        if (ie >= ItemsInUserInterface.Count)
        {
            return;
        }
        GobalSelectSelfCloseOtherSelect(this, ie);
        int item = ItemsInUserInterface[ie];

        UIShop.Instance.itemDestribe.ShowItemDestribe(item);
        UIShop.Instance.ToggleSelectPageItem(this, ItemsInUserInterface[ie]);
        SelectIndex.Clear();
        SelectIndex.Add(UIShop.ShopSelectType.TypeBuy, ie);
    }
Esempio n. 4
0
    protected override void OnButtonClickFunc(int ie)
    {
        int count  = 0;
        int itemId = -1;

        PlayerManager.Instance.LocalPlayer.UserGameItemsCount.TryGetValue(ie, out count);
        PlayerManager.Instance.LocalPlayer.UserGameItems.TryGetValue(ie, out itemId);
        if (ConfigReader.ItemXmlInfoDict.ContainsKey(itemId) && count != 0)
        {
            UIShop.Instance.itemDestribe.ShowItemDestribe(itemId);
            UIShop.Instance.ToggleSelectPageItem(this, itemId);
            GobalSelectSelfCloseOtherSelect(this, ie);
            SelectIndex.Clear();
            SelectIndex.Add(UIShop.ShopSelectType.TypeUser, ie);
        }
    }
        public void Select(object obj)
        {
            if (SelectIndex.Equals(-1))
            {
                return;
            }

            StoreInfo.CurrentWorkingTicket = StoreInfo.WorkingTickets[SelectIndex];

            //下料
            if (StoreInfo.UserExtraInfo.DepartID.Equals("0218" /*"0209"*/))
            {
                WindowHelper.WorkShopType = EnumManager.WorkShopTypeEnum.BlankingShop;

                //加载物料
                var resultA = ApiManager.GetBlankingMaterialInfo();
                if (!resultA.Result)
                {
                    MessageBox.Show(resultA.Msg, "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
                    return;
                }
            }
            //生产
            else
            {
                WindowHelper.WorkShopType = EnumManager.WorkShopTypeEnum.ProduceShop;

                //加载物料
                var resultA = ApiManager.GetMaterialInfo();
                if (!resultA.Result)
                {
                    MessageBox.Show(resultA.Msg, "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
                    return;
                }
            }

            //下载图纸文件
            var resultB = ApiManager.DownLoadPlanNeedFile();

            if (!resultB.Result)
            {
                MessageBox.Show(resultB.Msg, "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
            }

            WindowHelper.ShowPageOperatorRecord();
        }
Esempio n. 6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (SceneId != 0)
            {
                hash ^= SceneId.GetHashCode();
            }
            if (Like != 0)
            {
                hash ^= Like.GetHashCode();
            }
            if (PubState != 0)
            {
                hash ^= PubState.GetHashCode();
            }
            if (SelectState != 0)
            {
                hash ^= SelectState.GetHashCode();
            }
            if (SelectIndex != 0)
            {
                hash ^= SelectIndex.GetHashCode();
            }
            if (CreateTime != 0L)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (TipState != 0)
            {
                hash ^= TipState.GetHashCode();
            }
            return(hash);
        }