Ejemplo n.º 1
0
 public static GameMainArrowTipData[] GetArrowTipData(string str)
 {
     string[] arrowStrArray = str.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
     GameMainArrowTipData[] arrowTipData = new GameMainArrowTipData[arrowStrArray.Length];
     for (int i = 0; i < arrowStrArray.Length; i++)
     {
         string[] arrowSplit = arrowStrArray[i].Split(',');
         if (arrowSplit.Length != 2)
         {
             UnityEngine.Debug.LogError("error ArrowTipData : " + arrowStrArray[i]);
             continue;
         }
         GameMainArrowTipData tipData = new GameMainArrowTipData(long.Parse(arrowSplit[0]), long.Parse(arrowSplit[1]));
         arrowTipData[i] = tipData;
     }
     return(arrowTipData);
 }
Ejemplo n.º 2
0
        public void SetData(long id, GameMainArrowTipData arrowData)
        {
            if (arrowData != null)
            {
                this.m_isArrowTips = (arrowData.propId == id);
            }
            this.m_propId = id;
            ConfProp confProp = ConfProp.Get(id);

            if (confProp == null)
            {
                Visible = false;
            }
            this.m_skillId        = confProp.skillId;
            this.m_confSKill      = ConfSkill.Get(this.m_skillId);
            this.m_imgItem.Sprite = confProp.icon;
            PlayerPropMsg propMsg = GlobalInfo.MY_PLAYER_INFO.GetBagInfosByID(id);

            this.m_keepPropNum = propMsg == null ? 0 : propMsg.Count;

            if (GuidNewNodeManager.Instance.GetCommonParams(GuidNewNodeManager.PropFree).Equals(this.m_propId.ToString()))
            {
                this.m_lbRemain.Text = "free";
                return;
            }

            if (propMsg == null || propMsg.Count <= 0)
            {
                this.m_lbRemain.Text = "+";
                this.m_imgItem.SetGray(true);
                //this.CanClick = false;
                //this.m_btnItem.Enable = false;
            }
            else
            {
                this.m_lbRemain.Text = propMsg.Count.ToString();
                this.m_propId        = id;

                //this.CanClick = true;
                //this.m_btnItem.Enable = true;
                this.m_imgItem.SetGray(false);
            }
            //ReflashBtnEnable();
        }