|
@@ -0,0 +1,156 @@
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using Core.BattleReport;
|
|
|
+using GameLogic.Combat.CombatTool.CombatReport;
|
|
|
+using UnityEngine;
|
|
|
+using UnityEngine.UIElements;
|
|
|
+using static System.Drawing.FontStyle;
|
|
|
+
|
|
|
+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 shouDaoShangHangXingXi;
|
|
|
+ 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_style2");
|
|
|
+ foldout1.text = "英雄属性";
|
|
|
+ foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
|
|
|
+ foldout1.value = false;
|
|
|
+ visualElement_h.Add(foldout1);
|
|
|
+ VisualElement progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style2");
|
|
|
+ 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);
|
|
|
+ shouDaoShangHangXingXi = 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);
|
|
|
+ DrwaBattleReportValueDataModule(combatReportEntityInfo.CombatInfoModule, shangHangXingXi);
|
|
|
+ DrwaBattleReportValueDataModule(combatReportEntityInfo.InjuredInfoModule, shouDaoShangHangXingXi);
|
|
|
+
|
|
|
+ if (miaoShuFoldout.value)
|
|
|
+ {
|
|
|
+ combatPeportMassgeModle.OnGui();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void DrwaBattleReportValueDataModule(BattleReportValueDataModule battleReportValueDataModule,
|
|
|
+ ProgressBarShowModle progressBarShowModle)
|
|
|
+ {
|
|
|
+ foreach (var VARIABLE in battleReportValueDataModule.fightValueData_long.Values)
|
|
|
+ {
|
|
|
+ ReportFightValueData<long> reportFightValueData = VARIABLE;
|
|
|
+ progressBarShowModle.CrendHarmValue(reportFightValueData.name, reportFightValueData.value,
|
|
|
+ reportFightValueData.maxValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void Dispose()
|
|
|
+ {
|
|
|
+ combatReportEntityInfo = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|