public void Forging() { Image item1, item2; item1 = Item1.GetChild(0).GetComponent <Image>(); item2 = Item2.GetChild(0).GetComponent <Image>(); if (item1.sprite.name == item2.sprite.name) { Save.ForgingItem(int.Parse(item1.sprite.name)); ShowPage <TipPanel>("锻造成功"); GameObject.Destroy(Item1.GetChild(0).gameObject); GameObject.Destroy(Item2.GetChild(0).gameObject); } else { Debug.Log("无法锻造不同武器"); } }