| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 | 
							- #if UNITY_EDITOR
 
- using System;
 
- using System.Collections.Generic;
 
- using Core.BattleReport;
 
- using GameLogic.Combat.CombatTool.CombatReport;
 
- using UnityEngine;
 
- using UnityEngine.UIElements;
 
- namespace xy002Editor.CombatEditor
 
- {
 
-     public class HeroEntityCombatReport : IDisposable
 
-     {
 
-         // public CombaReportEnditorManager manager;
 
-         private CombatReportEntityInfo combatReportEntityInfo;
 
-         private Foldout foldout;
 
-         private CombaReportEnditorManager combaReportEnditorManager;
 
-         public Foldout root;
 
-         private ProgressBarShowModle cjShuXing;
 
-         private ProgressBarShowModle shangHangXingXi;
 
-         private ProgressBarShowModle zhiLiaoModle;
 
-         private ProgressBarShowModle beiZhiLiaoModel;
 
-         private ProgressBarShowModle shouDaoShangHangXingXi;
 
-         private ProgressBarShowModle gongFaBeiXueRuo;
 
-         private CombatPeportMassgeModle combatPeportMassgeModle;
 
-         public Foldout miaoShuFoldout;
 
-         public void Init(CombatReportEntityInfo combatReportEntityInfo,
 
-             CombaReportEnditorManager combaReportEnditorManager)
 
-         {
 
-             this.combaReportEnditorManager = combaReportEnditorManager;
 
-             this.combatReportEntityInfo = combatReportEntityInfo;
 
-             InitUI();
 
-         }
 
-         private void InitUI()
 
-         {
 
-             this.foldout = new Foldout();
 
-             foldout.text =
 
-                 $"ID:{combatReportEntityInfo.CombatHeroEntity.CurrCombatHeroInfo.modelID}";
 
-             // foldout.style.display = combatNewEditorWindow.heroData.style.display;
 
-             // foldout.style.marginLeft;
 
-             foldout.style.fontSize = 12;
 
-             // foldout.style.unityFontStyleAndWeight = Bold;
 
-             foldout.value = false;
 
-             if (combatReportEntityInfo.CombatHeroEntity.IsEnemy)
 
-             {
 
-                 root = combaReportEnditorManager.enemyHeroRoot;
 
-             }
 
-             else
 
-             {
 
-                 root = combaReportEnditorManager.myHeroRoot;
 
-             }
 
-             root.Add(foldout);
 
-             VisualElement visualElement_h = new VisualElement();
 
-             // VisualElement visualElement_h =combaReportEnditorManager.Copy<VisualElement>("hengxiang"); 
 
-             foldout.Add(visualElement_h);
 
-             VisualElement visualElement_v =
 
-                 combaReportEnditorManager.Copy<VisualElement>("value_data_entity_style"); //英雄信息
 
-             visualElement_h.Add(visualElement_v);
 
-             Label label = new Label();
 
-             label.text = "玩家名" + combatReportEntityInfo.CombatHeroEntity.CurrCombatHeroInfo.heroName;
 
-             visualElement_v.Add(label);
 
-             label = new Label();
 
-             label.text = "等级" + combatReportEntityInfo.CombatHeroEntity.CurrCombatHeroInfo.level;
 
-             visualElement_v.Add(label);
 
-             ScrollView ScrollView = combaReportEnditorManager.Copy<ScrollView>("value_scrollview");
 
-             foldout.Add(ScrollView);
 
-             Foldout foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "英雄属性";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             VisualElement progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             cjShuXing = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "照成伤害信息";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             shangHangXingXi = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "治疗信息";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             zhiLiaoModle = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "被治疗信息";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             beiZhiLiaoModel = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "受到伤害信息";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             shouDaoShangHangXingXi = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             foldout1.text = "功法被削弱";
 
-             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             foldout1.value = false;
 
-             visualElement_h.Add(foldout1);
 
-             progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
 
-             foldout1.Add(progressVe);
 
-             gongFaBeiXueRuo = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
-             
 
-             miaoShuFoldout = combaReportEnditorManager.Copy<Foldout>("foldout_style");
 
-             miaoShuFoldout.text = "战斗描述";
 
-             miaoShuFoldout.style.unityFontStyleAndWeight = FontStyle.Bold;
 
-             miaoShuFoldout.value = false;
 
-             visualElement_h.Add(miaoShuFoldout);
 
-             VisualElement miaoshuve = combaReportEnditorManager.Copy<VisualElement>("miaoshuve"); //英雄信息
 
-             miaoShuFoldout.Add(miaoshuve);
 
-             combatPeportMassgeModle = new CombatPeportMassgeModle();
 
-             combatPeportMassgeModle.Init(miaoshuve, combatReportEntityInfo, combaReportEnditorManager);
 
-         }
 
-         public void OnGUI()
 
-         {
 
-             if (!foldout.value)
 
-             {
 
-                 return;
 
-             }
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.HeroInfoModule, cjShuXing);
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.zhiLiao, zhiLiaoModle,
 
-                 combatReportEntityInfo.allZhiLiao);
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.beiZhiLiao, beiZhiLiaoModel,
 
-                 combatReportEntityInfo.allBeiZhiLiao);
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.CombatInfoModule, shangHangXingXi,
 
-                 combatReportEntityInfo.allHarm);
 
-             shangHangXingXi.CrendHarmValue("每秒伤害",  combatReportEntityInfo.allHarm/CombatReportManager.Instance.combatTime,
 
-                 combatReportEntityInfo.allHarm);
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.InjuredInfoModule, shouDaoShangHangXingXi,
 
-                 combatReportEntityInfo.allChengShang);
 
-             DrwaBattleReportValueDataModule(combatReportEntityInfo.gongFaBeiXueRuo, gongFaBeiXueRuo);
 
-             if (miaoShuFoldout.value)
 
-             {
 
-                 combatPeportMassgeModle.OnGui();
 
-             }
 
-         }
 
-         private void DrwaBattleReportValueDataModule(BattleReportValueDataModule battleReportValueDataModule,
 
-             ProgressBarShowModle progressBarShowModle, float maxValue = -1)
 
-         {
 
-             foreach (var VARIABLE in battleReportValueDataModule.fightValueData_long.Values)
 
-             {
 
-                 ReportFightValueData<float> reportFightValueData = VARIABLE;
 
-                 float max = reportFightValueData.maxValue;
 
-                 if (maxValue > 0)
 
-                 {
 
-                     max = maxValue;
 
-                 }
 
-                 progressBarShowModle.CrendHarmValue(reportFightValueData.name, reportFightValueData.value,
 
-                     max);
 
-             }
 
-         }
 
-         public void Dispose()
 
-         {
 
-             combatReportEntityInfo = null;
 
-             root.Remove(foldout);
 
-         }
 
-     }
 
- }
 
- #endif
 
 
  |