示例#1
0
        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;
        }
示例#2
0
        /// <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);
            }
        }
示例#3
0
 /// <summary>
 /// 削除する
 /// </summary>
 /// <param name="egg"></param>
 public void Remove(HatchItem hatch)
 {
     Remove(hatch.uniqid);
 }