void Setup() { var item = Entity.Instance.PetList.items.Find(v => v.uniqid == uniqid); for (int i = 0; i < (int)Param.Count; i++) { param[i].text = item.GetParam((Param)i).ToString(); } name.text = item.Familiar.Name; face.sprite = Resources.Load <Sprite>($"Familiar/{item.Familiar.Image}/base"); level.text = $"Lv.{item.level.ToString()}"; var start = (float)Entity.Instance.LevelTable.Exp(item.level); var end = (float)Entity.Instance.LevelTable.Exp(item.level + 1); expGauge.value = (item.exp - start) / (end - start); exp.text = $"{item.exp}/{end}"; skill.text = Entity.Name(item.skill); // 属性 EnumExtension <Attribute> .ForEach(v => { if (v == Entities.Attribute.Count) { return; } var index = (int)v; this.Attribute[index].value = item.Familiar.Attribute[index]; }); }