public void UseCommand() { if (pill == ItemManager.Label.Empty) //아이템 안들어감 { this.GetComponentInChildren <UnityEngine.UI.Text>().text = "알약을 넣어야 작동할 것 같습니다."; } else //아이템 들어감 { Debug.Log(pill.ToString() + "를 보여주었다."); npc.player.InventoryList.itemManager.ItemIdentify(pill); // 아이템 감정하고 npc.player.InventoryList.MedicineCommuni = false; //대화 끝남 추가하고 Destroy(npc.gObject); //이 박스 터트리고 GameObject.Find("MedicineMaster").GetComponent <MedicineMaster>().pill = pill; npc.talk(npc.player); //다음 작업 수행 } }
public void UseCommand() { if (injector == ItemManager.Label.Empty) //아이템 안들어감 { this.GetComponentInChildren <UnityEngine.UI.Text>().text = "음료수.... 음료수를 주세요!"; } else //아이템 들어감 { Debug.Log(injector.ToString() + "를 주었다."); npc.player.DumpItem(npc.player.InventoryList.Getindex(injector)); // 아이템 버리고 npc.player.InventoryList.InjecCommuni = false; //대화 끝남 추가하고 Destroy(npc.gObject); //이 박스 터트리고 npc.talk(npc.player); //다음 작업 수행 } //inventoryItem.DumpCommand(); //npc.extalk( npc.player, npc.player.InventoryList.GetLabel( inventoryItem.Index ) ); }