public void Setup(Entities.HatchItem item) { hatch = item; this.egg = Entity.Instance.EggList.items.Find(v => v.uniqid == item.uniqid); var rarity = ""; for (int i = 0; i < this.egg.rarity; i++) { rarity += "★"; } this.rarity.text = rarity; }
/// <summary> /// 変更する /// </summary> /// <param name="egg"></param> public void Modify(HatchItem hatch) { var index = items.FindIndex(v => v.uniqid == hatch.uniqid); if (index != -1) { items[index] = hatch; } else { items.Add(hatch); } }
/// <summary> /// 削除する /// </summary> /// <param name="egg"></param> public void Remove(HatchItem hatch) { Remove(hatch.uniqid); }