コード例 #1
0
    private void EightDayBtnClick()
    {
        UISign_inData.Instance().DoodsID = (int)FSDataNodeTable <UISign_inNode> .GetSingleton().DataNodeList[43].reward_prop[0];

        UISign_inData.Instance().DoodsNum = (int)FSDataNodeTable <UISign_inNode> .GetSingleton().DataNodeList[43].reward_prop[1];

        UISign_inData.Instance().ItemNode = GameLibrary.Instance().ItemStateList[FSDataNodeTable <UISign_inNode> .GetSingleton().DataNodeList[43].reward_prop[0]];
        UISign_inData.Instance().ID       = FSDataNodeTable <UISign_inNode> .GetSingleton().DataNodeList[43].reward_prop[0];

        ClientSendDataMgr.GetSingle().GetUISign_inSend().SendGetUISign_inCumulative(C2SMessageType.PASVWait, 4);//发送累计领取
    }
コード例 #2
0
ファイル: UISign_inHandle.cs プロジェクト: moto2002/moba
    private bool GetUISign_inCumulative(CReadPacket packet)
    {
        Dictionary <string, object> data = packet.data;
        int resolt = int.Parse(data["ret"].ToString());

        if (resolt == 0)
        {
            playerData.GetInstance().singnData.Signed = (data["signed"].ToString());
            //Control.ShowGUI(UIPanleID.UIWelfare);
            GoodsDataOperation.GetInstance().AddGoods(UISign_inData.Instance().DoodsID, UISign_inData.Instance().DoodsNum);
        }
        else
        {
            UIgoodstips.Instances.Setgoods(UISign_inData.Instance().ItemNode, UISign_inData.Instance().ID);
            Control.Show(UIPanleID.UIgoodstips);
        }
        return(true);
    }
コード例 #3
0
    //补签
    private void OnSign_inReplenishBtnClick()
    {
        int jewel = 0;

        foreach (var item in FSDataNodeTable <ResetLaterNode> .GetSingleton().DataNodeList.Values)
        {
            jewel = item.retroactiveBuy;
        }
        int day = Convert.ToInt32(TimeManager.Instance.ConvertIntDateTime(Auxiliary.GetNowTime()).ToString("dd"));

        if (day - int.Parse(playerData.GetInstance().singnData.Signed.Substring(12, 2)) > 0)
        {
            if (FSDataNodeTable <VipNode> .GetSingleton().DataNodeList[playerData.GetInstance().selfData.vip].retroactive_limit - int.Parse(playerData.GetInstance().singnData.Signed.Substring(12, 2)) > 0)
            {
                // UISign_intBox.Instance.ShowLabel("签到需要" + jewel.ToString() + "钻石");

                foreach (var item in FSDataNodeTable <UISign_inNode> .GetSingleton().DataNodeList.Values)
                {
                    if (item.reward_prop != null)
                    {
                        if (item.day == int.Parse(playerData.GetInstance().singnData.Signed.Substring(6, 2)) + 1)
                        {
                            UISign_inData.Instance().DoodsID  = (int)item.reward_prop[0];
                            UISign_inData.Instance().DoodsNum = (int)item.reward_prop[1];;
                        }
                    }
                }
                object[] obj = new object[5] {
                    null, "签到需要" + jewel.ToString() + "钻石", UIPopupType.EnSure, this.gameObject, "OnEnsureClick"
                };
                Control.ShowGUI(UIPanleID.UIPopUp, EnumOpenUIType.DefaultUIOrSecond, false, obj);
            }
            else
            {
                Control.ShowGUI(UIPanleID.UITooltips, EnumOpenUIType.DefaultUIOrSecond, false, "您当前补签次数是0次,可提升VIP等级,增加补签次数.");
                //Control.ShowGUI(GameLibrary.UITooltips);
            }
        }
        else
        {
            Control.ShowGUI(UIPanleID.UITooltips, EnumOpenUIType.DefaultUIOrSecond, false, "您没有可补签的日期");
            //Control.ShowGUI(GameLibrary.UITooltips);
        }
    }
コード例 #4
0
ファイル: UISign_inItem.cs プロジェクト: moto2002/moba
 //点击领取签到物品
 private void OnIconClick()
 {
     for (int i = 0; i < UISign_inData.Instance().GoodsNumList.Length; i++)
     {
         if (index == i)
         {
             if (UISign_inData.Instance().GoodsNumList[0] != null)
             {
                 UISign_inData.Instance().DoodsID  = Convert.ToInt32(UISign_inData.Instance().GoodsNumList[0]);
                 UISign_inData.Instance().DoodsNum = Convert.ToInt32(UISign_inData.Instance().GoodsNumList[1]);
             }
         }
     }
     for (int j = 0; j < UISign_in.itemRankList.Count; j++)
     {
         if (index == j)
         {
             if (UISign_in.itemRankList[j].reward_prop != null)
             {
                 UISign_inData.Instance().ItemNode  = GameLibrary.Instance().ItemStateList[UISign_in.itemRankList[j].reward_prop[0]];
                 UISign_inData.Instance().ID        = UISign_in.itemRankList[j].reward_prop[0];
                 UISign_inData.Instance().goodsType = true;
             }
             else
             {
                 UISign_inData.Instance().goodsType = false;
             }
         }
         if (int.Parse(playerData.GetInstance().singnData.Signed.Substring(4, 2)) < time.Day && index == int.Parse(playerData.GetInstance().singnData.Signed.Substring(6, 2)))
         {
             ClientSendDataMgr.GetSingle().GetUISign_inSend().SendGetUISign_in(C2SMessageType.PASVWait);//发送每日签到列表
             List <ItemData> datalist = new List <ItemData>();
             ItemData        data     = new ItemData();
             if (((UISign_inNode)item).reward_prop != null)
             {
                 if (int.Parse(((UISign_inNode)item).reward_prop[0].ToString().Substring(0, 3)) == 107 || int.Parse(((UISign_inNode)item).reward_prop[0].ToString().Substring(0, 3)) == 106)
                 {
                     data.UiAtlas  = UIHeroHeadatlas;
                     data.IconName = GameLibrary.Instance().ItemStateList[((UISign_inNode)item).reward_prop[0]].icon_name;
                 }
                 else
                 {
                     data.UiAtlas  = Propatlas;
                     data.IconName = GameLibrary.Instance().ItemStateList[((UISign_inNode)item).reward_prop[0]].icon_name.ToString();
                 }
                 data.Name      = GameLibrary.Instance().ItemStateList[((UISign_inNode)item).reward_prop[0]].name;
                 data.Count     = int.Parse(((UISign_inNode)item).reward_prop[1].ToString());
                 data.GradeTYPE = gradeTYPE;
             }
             else
             {
                 data.UiAtlas   = Propatlas;
                 data.IconName  = "zuanshi";
                 data.Name      = "钻石";
                 data.Count     = ((UISign_inNode)item).reward_money;
                 data.GradeTYPE = GradeType.Orange;
             }
             datalist.Add(data);
             TaskManager.Single().itemlist   = datalist;
             UISign_inData.Instance()._index = index;
         }
         else
         {
             if (UISign_inData.Instance().goodsType != false)
             {
                 UIgoodstips.Instances.Setgoods(UISign_inData.Instance().ItemNode, UISign_inData.Instance().ID);
                 Control.Show(UIPanleID.UIgoodstips);
             }
             else
             {
                 //钻石操作
                 UIgoodstips.Instances.SetjewelImg(UIgoodstips.goodsType.jewel);
                 Control.Show(UIPanleID.UIgoodstips);
             }
         }
     }
 }
コード例 #5
0
ファイル: UISign_inItem.cs プロジェクト: moto2002/moba
    public override void Info(object obj)
    {
        //Prop
        //    UIHeroHead
        item = obj;
        if (((UISign_inNode)obj).reward_prop != null)
        {
            UISign_inData.Instance().GoodsNumList = ((UISign_inNode)obj).reward_prop;
            string goodsID    = ((UISign_inNode)obj).reward_prop[0].ToString();
            int    heroId     = int.Parse(201 + StringUtil.SubString(goodsID, 6, 3));
            int    goodsIDNum = int.Parse(goodsID.Substring(0, 3));
            if (goodsIDNum == 107 || goodsIDNum == 106)
            {
                Icons.uiAtlas    = UIHeroHeadatlas;
                Icons.spriteName = GameLibrary.Instance().ItemStateList[((UISign_inNode)obj).reward_prop[0]].icon_name;
            }
            else
            {
                Icons.uiAtlas    = Propatlas;
                Icons.spriteName = GameLibrary.Instance().ItemStateList[((UISign_inNode)obj).reward_prop[0]].icon_name.ToString();
            }
            count.text = ((UISign_inNode)obj).reward_prop[1].ToString();
            if (goodsIDNum == 107)
            {
                count.text = "";
                if (FSDataNodeTable <HeroNode> .GetSingleton().DataNodeList.ContainsKey(heroId))
                {
                    mStar = FSDataNodeTable <HeroNode> .GetSingleton().DataNodeList[heroId].init_star;

                    for (int i = 0; i < mStar; i++)
                    {
                        star[i].SetActive(true);
                    }
                    for (int i = mStar; i < star.Count; i++)
                    {
                        star[i].SetActive(false);
                    }
                    grid.Reposition();
                }
            }
            if (goodsIDNum == 106)
            {
                Sprite.transform.gameObject.SetActive(true);
            }
            else
            {
                Sprite.transform.gameObject.SetActive(false);
            }

            switch (GameLibrary.Instance().ItemStateList[((UISign_inNode)obj).reward_prop[0]].grade)
            {
            case 1:
                sprite.spriteName = "hui";
                gradeTYPE         = GradeType.Gray;
                break;

            case 2:
                sprite.spriteName = "lv";
                gradeTYPE         = GradeType.Green;
                break;

            case 4:
                sprite.spriteName = "lan";
                gradeTYPE         = GradeType.Blue;
                break;

            case 7:
                sprite.spriteName = "zi";
                gradeTYPE         = GradeType.Purple;
                break;

            case 11:
                sprite.spriteName = "cheng";
                gradeTYPE         = GradeType.Orange;
                break;

            case 16:
                sprite.spriteName = "hong";
                gradeTYPE         = GradeType.Red;
                break;

            default:
                break;
            }
        }
        else
        {
            //钻石图集
            //jewel.transform.gameObject.SetActive(true);
            Icons.uiAtlas     = Propatlas;
            Icons.spriteName  = "zuanshi";
            sprite.spriteName = "cheng";//钻石默认边框
            count.text        = ((UISign_inNode)obj).reward_money.ToString();
        }

        if (index == int.Parse(playerData.GetInstance().singnData.Signed.Substring(6, 2)))
        {
            if (int.Parse(playerData.GetInstance().singnData.Signed.Substring(4, 2)) < time.Day)
            {
                OK.transform.gameObject.SetActive(true);
            }
        }
        if (index < int.Parse(playerData.GetInstance().singnData.Signed.Substring(6, 2)))
        {
            Sign_inListOK.transform.gameObject.SetActive(true);
        }
        if (((UISign_inNode)obj).vip_limit != 0)
        {
            VIP.transform.gameObject.SetActive(true);
            VIPNum.text = "双倍\n会员" + ((UISign_inNode)obj).vip_limit.ToString();
        }
    }