コード例 #1
0
    public void SetUI(ReadExcelDataUtil data)
    {
        mQuestId = data.GetValue <int>(Constant.EXCEL_QuestId);

        QuestNameText.SetText(data.GetValue <string>(Constant.EXCEL_QuestName));

        //经验、金币
        BasicRewardText1.SetText(data.GetValue <int>(Constant.EXCEL_BasicRewardText1) + "经验".ToString());
        BasicRewardText2.SetText(data.GetValue <int>(Constant.EXCEL_BasicRewardText2) + "金币".ToString());
        //装备、材料
        ItemRewardText1.SetText(data.GetValue <string>(Constant.EXCEL_ItemRewardText1));
        ItemRewardText2.SetText(data.GetValue <string>(Constant.EXCEL_ItemRewardText2));
        //道具奖励图片
        ItemRewardImg1.overrideSprite = GameUtil.LoadSprite(Constant.PATH_ItemImg + data.GetValue <string>(Constant.EXCEL_ItemRewardImg1));
        ItemRewardImg2.overrideSprite = GameUtil.LoadSprite(Constant.PATH_ItemImg + data.GetValue <string>(Constant.EXCEL_ItemRewardImg2));
    }
コード例 #2
0
 public void SetUI(ReadExcelDataUtil excel)
 {
     mChapterId = excel.GetValue <int>(Constant.EXCEL_ChapterId);
     mChapterName.SetText(excel.GetValue <string>(Constant.EXCEL_ChapterName));
     Debug.Log("主线剧情panel赋值完毕:chapterId=" + mChapterId);
 }