Beispiel #1
0
    public static void ParseData(string content, string fileName)
    {
        metaData = new Dictionary <int, ArtifactChangeData> ();

        CSVParser parser = new CSVParser();

        if (!parser.Parse(content))
        {
            ClientLog.Instance.LogError("ArtifactChangeData" + ConfigLoader.Instance.csvext + "解析错误");
            return;
        }

        int recordCounter       = parser.GetRecordCounter();
        ArtifactChangeData data = null;

        for (int i = 0; i < recordCounter; ++i)
        {
            data = new ArtifactChangeData();

            string profession = parser.GetString(i, "Type");
            if (!string.IsNullOrEmpty(profession))
            {
                data._JobType = (JobType)Enum.Parse(typeof(JobType), profession);
            }
            data._Id       = (int)data._JobType;
            data._Icon     = parser.GetString(i, "Icon");
            data._Diamonds = parser.GetInt(i, "Diamonds");
            metaData[i]    = data;
        }
        parser.Dispose();
        parser = null;
    }
Beispiel #2
0
 private void OnClickMagicCell(ButtonScript obj, object args, int param1, int param2)
 {
     for (int i = 0; i < changeCellList.Count; i++)
     {
         changeCellList[i].selectImg.gameObject.SetActive(false);
     }
     obj.GetComponent <MagicChangeCellUI> ().selectImg.gameObject.SetActive(true);
     _seletData             = obj.GetComponent <MagicChangeCellUI>().ArtifactData;
     needZhuanMoneyLab.text = obj.GetComponent <MagicChangeCellUI> ().ArtifactData._Diamonds.ToString();
 }
Beispiel #3
0
    public void updateZhaunhuan()
    {
        //zhanhuanObj.gameObject.SetActive (true);
        itemsObj.gameObject.SetActive(false);

        List <ArtifactChangeData> aList = new List <ArtifactChangeData> ();

        for (int i = 0; i < ArtifactChangeData.metaData.Count; i++)
        {
            if (ArtifactChangeData.metaData[i]._JobType != JobType.JT_Axe)          //GamePlayer.Instance.MagicItemJob)
            {
                aList.Add(ArtifactChangeData.metaData[i]);
            }
        }

        for (int j = 0; j < aList.Count; j++)
        {
            changeCellList[j].ArtifactData = aList[j];
        }

        for (int i = 0; i < changeCellList.Count; i++)
        {
            changeCellList[i].selectImg.gameObject.SetActive(false);
        }
        _seletData = null;

        selfJobLab.text       = LanguageManager.instance.GetValue("JT_Axe");  //GamePlayer.Instance.MagicItemJob.ToString ());
        selfJobImg.spriteName = "JT_Axe";

        ArtifactLevelData data = ArtifactLevelData.GetData(GamePlayer.Instance.MagicItemLevel, (int)JobType.JT_Axe);         //GamePlayer.Instance.MagicItemJob);

        //icon.spriteName = BagSystem.instance.GetQualityBack((int)ItemData.GetData((int)data._ItemId).quality_);
        //HeadIconLoader.Instance.LoadIcon(data._Icon,iconImg);
        ItemData item = ItemData.GetData(data._ItemId);

        nameLab.text = item.name_;
        //barExpLab.text = GamePlayer.Instance.MagicItemExp + "/" + data.exp_;
        //expBar.value = (float)GamePlayer.Instance.MagicItemExp/(float)data.exp_ ;
        //levelLab.text = "Lv: "+ GamePlayer.Instance.MagicItemLevel;
        //barLevelLab.text = "Lv: "+ GamePlayer.Instance.MagicItemLevel;

        foreach (GameObject x in effectObjlist)
        {
            x.SetActive(false);
        }
        if (GamePlayer.Instance.MagicItemLevel / 10 > 0)
        {
            effectObjlist [GamePlayer.Instance.MagicItemLevel / 10 - 1].SetActive(true);
        }
    }