protected override void Render(UIOverviewStatisticsModule definition) { if (!EntityManager.TryGetComponentData(definition.Data.Entity, out UnitStatistics stats)) { return; } definition.miniStats.healthLabel.Value = stats.Health; definition.miniStats.defenseLabel.Value = stats.Defense; definition.miniStats.strengthLabel.Value = stats.Attack; definition.miniStats.attackSpeedLabel.Value = stats.AttackSpeed; unitStatusEffectList.Clear(); statusEffectManager.ReadSettings(definition.Data.Entity, unitStatusEffectList, constraint); for (var i = 0; i < definition.miniStats.rows.Length; i++) { var row = definition.miniStats.rows[i]; if (i >= unitStatusEffectList.Count) { row.gameObject.SetActive(false); continue; } var settings = unitStatusEffectList[i]; row.gameObject.SetActive(true); row.background.color = statusEffectManager.GetColor(settings.Id); row.icon.sprite = statusEffectManager.GetSprite(settings.Id); row.category.text = statusEffectsLocal[settings.Id, "Name"]; row.power.Value = (int)settings.Power; row.resistance.Value = (int)settings.Resistance; row.gain.Value = settings.RegenPerSecond; row.immunity.Value = settings.Immunity; } if (!definition.IsActive) { return; } if (exitRequested) { definition.exit(); } }