/// <summary> /// アイテムを倉庫にしまう /// </summary> /// <param name="obj">しまうアイテム</param> public void AddItem(GameObject obj) { //種類の選別 if (obj.GetComponent <Item>()) { var i = obj.GetComponent <Item>(); _itemrepository.AddItem(i._name, i._message, i._recovery, i._stock, i._type, i._effect.ToString()); Destroy(i); } else if (obj.GetComponent <Weapon>()) { var i = obj.GetComponent <Weapon>(); _weaponrepository.AddItem(i._name, i._message, i._stock, i._type, i._atk, i._weight, i._hit, i._critical, i._attackcount, i._min, i._max, i._weapontype.ToString()); Destroy(i); } }