using System.Collections; using System.Collections.Generic; using UnityEngine; public class ItemInstall : MonoBehaviour { public GameObject itemMenu; public List itemList; public int itemID = 0; public GameObject leftHand; public GameObject other; public Menu menu; public void openClipMenu() { itemMenu.SetActive(true); //menu.shakeEvent.AddListener(produceItem); } public void closeClipMenu() { itemMenu.SetActive(false); } public void produceItem() { GameObject newItem = Instantiate(itemList[itemID], other.transform); newItem.transform.position = leftHand.transform.position + new Vector3(0f, 0.2f, 0f); } }