// Use this for initialization void Awake() { ItemInfoPanel = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").Find("ItemInfoPanel").GetComponent<UIItemInfoPanel>(); playerState = PlayerState._instance; OnEquepChanged(); playerState.OnPlayerStateChanged += OnStateChanged; }
// Use this for initialization void Start () { playerState = PlayerState._instance; ItemInfoPanel = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").Find("ItemInfoPanel").GetComponent<UIItemInfoPanel>(); switch (from) { case ItemFrom.Bag: item = playerState.GetPlayerBag().dictionBag[int.Parse(gameObject.transform.parent.name)]; break; case ItemFrom.Equep: break; case ItemFrom.Shop: item = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").Find("ShopBG").GetComponent<UIShopManager>().getShopDictionary()[int.Parse(gameObject.transform.parent.name)]; break; default: break; } }