//初始化当前步骤 public void InitStep() { RoundStep step = levelData.rounds[CurrentRound].steps[CurrentStep]; UIRoundData[2] = step.stepType; UIRoundData[1] = (object)RemainRound; MaxStep = levelData.rounds[CurrentRound].steps.Length; UIGameRound roundUI = (UIGameRound)UIManager.Instance.GetPageInstatnce <UIGameRound>(); //特殊步骤的特殊配置数据 if (step.stepType == StepType.Think) { roundUI.SetFriend("判定你的名誉值为" + Hornor, (int)FinalNPCRate * 100); } roundUI.UpdateDataShow(); if (step.stepType == StepType.UseCard) { NextActions = 2; card1 = step.CardList[0]; card2 = step.CardList[1]; card3 = step.CardList[2]; } else { NextActions = 1; } }
//显示结果 public IEnumerator ShowResult(int type) { UIRoundData[2] = StepType.Result; UIGameRound roundUI = (UIGameRound)UIManager.Instance.GetPageInstatnce <UIGameRound>(); roundUI.UpdateDataShow(); string show = type == 1 ? "结果公布:己方合作,对方合作" : type == 2 ? "结果公布:己方合作,对方不合作":type == 3 ? "结果公布:己方不合作,对方合作" : "结果公布:己方不合作,对方不合作"; roundUI.SetResult(show, EarnMoney(type)); yield return(new WaitForSeconds(3)); DoStep(); }