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