public void show(GameRPGShopInfo i, OnEventOver over) { info = i; onEventOver = over; show(); shopUI.gameObject.SetActive(false); bagUI.gameObject.SetActive(false); moneyText.gameObject.SetActive(false); itemText.gameObject.SetActive(false); Background1.gameObject.SetActive(false); Background2.gameObject.SetActive(false); string path = "Prefab/Shop/Shop" + GameDefine.getString2(info.shop); GameObject gameOjbect = Resources.Load <GameObject>(path); GameObject obj = Instantiate(gameOjbect, transBackground); Transform trans = obj.transform; trans.localPosition = new Vector3(0.0f, 0.0f, 0.0f); trans.localScale = new Vector3(1.0f, 1.0f, 1.0f); gameAnimation = obj.GetComponent <GameAnimation>(); gameAnimation.UI = true; gameAnimation.offsetX = -(int)(GameCameraManager.instance.sceneWidthHalf - GameCameraManager.instance.xOffset); gameAnimation.offsetY = (int)(GameCameraManager.instance.sceneHeightHalf); gameAnimation.showFrame(0); obj = Instantiate(gameOjbect, transBackground); trans = obj.transform; trans.localPosition = new Vector3(0.0f, 0.0f, 0.0f); trans.localScale = new Vector3(1.0f, 1.0f, 1.0f); gameAnimation = obj.GetComponent <GameAnimation>(); gameAnimation.UI = true; gameAnimation.offsetX = -(int)(GameCameraManager.instance.sceneWidthHalf - GameCameraManager.instance.xOffset); gameAnimation.offsetY = (int)(GameCameraManager.instance.sceneHeightHalf); gameAnimation.playAnimation(0, gameAnimation.safHead.count3[0], false, onShowOver); shopUI.setType(GameItemBagUI.GameItemBagUIType.Shop); shopUI.setShopType(info.type); bagUI.setType(GameItemBagUI.GameItemBagUIType.User); bagUI.setUser(0); shopUI.setUser(0); shopUI.setItems(info.item); bagUI.setItems(GameUserData.instance.getUnitBase(0).Items); bagUI.select(0); shopUI.enable(true); bagUI.enable(false); shopUI.select(0); updateText(); }