/*初始化所有private变量*/ private void InitVars() { Techniquepanel = transform.FindChild("TechniqueUpgradePanel").GetComponent <TechniquePanel>(); ShoppingBagManager = transform.FindChild("ShoppingBag").GetComponent <ShoppingBagManager>(); BagManager = transform.FindChild("Bag").GetComponent <BagManager>(); PlayEquipInfo = transform.FindChild("PlayEquipInfo").GetComponent <PlayEquipInfo>(); myChangeScene = GameObject.Find("changeScene").GetComponent <ChangeScene>(); }
// Use this for initialization void Start() { PlayEquipInfo = GameObject.Find("BagSystem").transform.FindChild("PlayEquipInfo").GetComponent <PlayEquipInfo>(); Shop = GameObject.Find("BagSystem").GetComponent <Shop>(); ResetPanelManager = GameObject.Find("BagSystem").transform.FindChild("ResetPanel").GetComponent <ResetPanelManager>(); }