/// <summary> /// 播放动画 /// </summary> /// <param name="delayTime"></param> /// <returns></returns> IEnumerator PlayerAnimation() { string[] temp = (from x in m_reportData.Enemys select GetMonsterReportText(x.Key, x.Value, true)).ToArray(); var m_reportDataList = m_tranReportList.GetComponentsInChildren <MogoListImproved>(true)[0].DataList; for (int i = 0; i < m_reportData.Enemys.Count; i++) { if (i < m_reportDataList.Count) { yield return(new WaitForSeconds(1.0f)); InstanceCleanReportGrid unit = (InstanceCleanReportGrid)m_reportDataList[i]; string content = temp[i]; unit.SetContent(content, new Color32(172, 227, 5, 255)); } } yield return(new WaitForSeconds(1.5f)); // 真正请求扫荡 OnCleanRealUp(); // 显示奖励信息 GenerateRewardReport(); }
// 创建获取奖励信息 void RewardResourceLoaded() { var m_reportDataList = m_tranReportList.GetComponentsInChildren <MogoListImproved>(true)[0].DataList; int itemStartIndex = 0; int itemEndIndex = itemStartIndex + (int)Math.Ceiling((double)m_reportData.Items.Count) - 1; for (int i = 0; i < m_reportDataList.Count; i++) { InstanceCleanReportGrid unit = (InstanceCleanReportGrid)m_reportDataList[i]; if (i >= itemStartIndex && i <= itemEndIndex) { string[] temp = (from x in m_reportData.Items select GetRewardItemReportText(x.Key, x.Value, false)).ToArray(); unit.Head = false; if (i == 1 + (int)Math.Ceiling((double)m_reportData.Items.Count)) { string content = String.Join(",", temp, (i - itemStartIndex), 1); unit.SetContent(content, new Color32(172, 227, 5, 255)); } else { string content = String.Join(",", temp, (i - itemStartIndex), 1); unit.SetContent(content, new Color32(172, 227, 5, 255)); } } else if (i == itemEndIndex + 1) { if (m_reportData.exp > 0) { // 经验 string content = string.Concat(LanguageData.GetContent(262), "x", m_reportData.exp /*, LanguageData.GetContent(46959)*/); unit.SetContent(content, new Color32(172, 227, 5, 255)); } else if (m_reportData.gold > 0) { // 金币 string content = string.Concat(LanguageData.GetContent(263), "x", m_reportData.gold /*, LanguageData.GetContent(46959)*/); unit.SetContent(content, new Color32(172, 227, 5, 255)); } } else if (i == itemEndIndex + 2) { // 金币 string content = string.Concat(LanguageData.GetContent(263), "x", m_reportData.gold, LanguageData.GetContent(46959)); unit.SetContent(content, new Color32(172, 227, 5, 255)); } else { unit.SetContent(String.Empty, new Color32(255, 255, 255, 255)); unit.Head = false; } } m_tranReportList.gameObject.SetActive(true); }
// 创建怪物扫荡信息并播放 void MonsterResourceLoaded() { var m_reportDataList = m_tranReportList.GetComponentsInChildren <MogoListImproved>(true)[0].DataList; int enemyStartIndex = 0; int enemyEndIndex = enemyStartIndex + (int)Math.Ceiling((double)m_reportData.Enemys.Count) - 1; for (int i = 0; i < m_reportDataList.Count; i++) { InstanceCleanReportGrid unit = (InstanceCleanReportGrid)m_reportDataList[i]; if (i >= enemyStartIndex && i <= enemyEndIndex) { string[] temp = (from x in m_reportData.Enemys select GetMonsterReportText(x.Key, x.Value)).ToArray(); unit.Head = false; if (i == 1 + (int)Math.Ceiling((double)m_reportData.Enemys.Count)) { string content = String.Join(",", temp, (i - enemyStartIndex), 1); unit.SetContent(content, new Color32(255, 255, 255, 255)); } else { string content = String.Join(",", temp, (i - enemyStartIndex), 1); unit.SetContent(content, new Color32(255, 255, 255, 255)); } } else { unit.SetContent(String.Empty, new Color32(255, 255, 255, 255)); unit.Head = false; } } m_tranReportList.gameObject.SetActive(true); if (m_myTransform.gameObject.activeSelf == true) { StartCoroutine("PlayerAnimation"); } }