using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; namespace xy002Editor.CombatEditor { public class ProgressBarShowModle { public VisualElement root; private Dictionary valueReprot = new Dictionary(); public CombaReportEnditorManager manager; public ProgressBarShowModle(VisualElement root, CombaReportEnditorManager manager) { this.root = root; this.manager = manager; } public void CrendHarmValue(string vname, float currValue, float maxValue) { if (valueReprot.TryGetValue(vname, out HeroValueReport heroValueReport)) { heroValueReport.progressBar.title = currValue.ToString(); heroValueReport.progressBar.lowValue = currValue; heroValueReport.progressBar.highValue = maxValue; } else { heroValueReport = new HeroValueReport(); VisualElement herovaluegrid = manager.Copy("value_data_entity_style"); root.Add(herovaluegrid); Label testv = manager.Copy