예제 #1
0
 private void Awake()
 {
     ChapterData        = TableDataExtension.GetTableData <DRChapter>(Data.GetInstance().getcurrentChapterID());
     LevelData          = TableDataExtension.GetTableData <DRBattle>(Data.GetInstance().getcurrentLevelID());
     ChapterNum         = TableDataExtension.GetTableData <DRScene>(Data.GetInstance().getcurrentSceneID()).ChapterNum;
     currentLevelallNum = ChapterData.BattleNum;
 }
예제 #2
0
        //我失败了
        private void testLoser()
        {
            passLevelUIshow();
            int Chapter = Data.GetInstance().getcurrentChapterID();

            Data.GetInstance().setcurrentLevelID(int.Parse(Chapter + "01"));
            LevelData       = TableDataExtension.GetTableData <DRBattle>(Data.GetInstance().getcurrentLevelID());
            Level_Text.text = Data.GetInstance().getcurrentLevelID() + "";
            Debug.Log("失败");
        }
예제 #3
0
 /// <summary>
 /// 展示 关卡 相关信息
 /// </summary>
 private void UIInfoShowByCurrentLevelID()
 {
     if (LevelData.BattleOrder == currentLevelallNum)
     {
         Debug.Log("当前章节已完成---结算界面,玩家选择下个章节");
         Level_Text.text = "模拟通关";
         test_image.SetActive(true);
         return;
     }
     Data.GetInstance().pluscurrentLevelID(1);
     refreshMaxLevel();
     LevelData       = TableDataExtension.GetTableData <DRBattle>(Data.GetInstance().getcurrentLevelID());
     Level_Text.text = Data.GetInstance().getcurrentLevelID() + "";
 }
예제 #4
0
        // 通关点击事件--->开启新章程/开启新场景
        private void testPass()
        {
            if (ChapterData.ChapterOrder == ChapterNum)
            {
                //本场景所有章节全部完成 开启下个场景***预留
                Data.GetInstance().pluscurrentSceneID(1);
                Data.GetInstance().datachangeByScene();
                refreshMaxLevel();

                //Debug.Log("章节结束");
                test_image.SetActive(false);
                goback();
                return;
            }
            Data.GetInstance().pluscurrentChapterID(1);
            UIInfoShowByChapterID();
            LevelData = TableDataExtension.GetTableData <DRBattle>(Data.GetInstance().getcurrentLevelID());
            refreshMaxLevel();
            passLevelUIshow();
            test_image.SetActive(false);
        }
예제 #5
0
        //章节ID 展示:通关奖励&章节选择
        private void UIInfoShowByChapterID()
        {
            ChapterData        = TableDataExtension.GetTableData <DRChapter>(Data.GetInstance().getcurrentChapterID());
            currentLevelallNum = ChapterData.BattleNum;
            Data.GetInstance().datachangeByChapter();
            LevelData = TableDataExtension.GetTableData <DRBattle>(Data.GetInstance().getcurrentLevelID());
            isshowLRLevle();
            Level_Text.text = Data.GetInstance().getcurrentLevelID() + "";
            passLevelUIshow();
            //Debug.Log(LevelData.BattleOrder);
            if (ChapterData == null)
            {
                //Debug.Log("小老弟你怎么了");
                return;
            }
            EnegyBonusNum_text.text = ChapterData.EnegyBonusNum + "";
            CoinBonusNum_text.text  = ChapterData.CoinBonusNum + "";
            GoldBonusNum_text.text  = ChapterData.GoldBonusNum + "";

            S_text.text = ChapterData.ChapterOrder + "";
            ChoiceShowing.GetComponent <Image>().sprite = Resources.Load("UI/UIphoto/choiceMenuUI/chaptericon_" + (ChapterData.ChapterOrder), typeof(Sprite)) as Sprite;
            if (ChapterData.ChapterOrder == 1)
            {
                L_text.text = "";
            }
            else
            {
                L_text.text = ChapterData.ChapterOrder - 1 + "";
                ChoiceLeft.GetComponent <Image>().sprite = Resources.Load("UI/UIphoto/choiceMenuUI/chaptericon_" + (ChapterData.ChapterOrder - 1), typeof(Sprite)) as Sprite;
            }
            if (ChapterData.ChapterOrder == ChapterNum)
            {
                R_text.text = "";
            }
            else
            {
                R_text.text = ChapterData.ChapterOrder + 1 + "";
                ChoiceRight.GetComponent <Image>().sprite = Resources.Load("UI/UIphoto/choiceMenuUI/chaptericon_" + (ChapterData.ChapterOrder + 1), typeof(Sprite)) as Sprite;
            }
        }