//卸载场景对象 public override void Dispose() { base.Dispose(); //Debug.Log("卸载选择用户界面"); UnityEngine.GameObject.Destroy(m_Background.gameObject); m_Background = null; UnityEngine.GameObject.Destroy(m_SelectXiongDaControl.gameObject); m_SelectXiongDaControl = null; UnityEngine.GameObject.Destroy(m_SelectXiong2Control.gameObject); m_SelectXiong2Control = null; }
//初始化界面 public void InitUI() { //Debug.Log("角色界面初始化完毕"); ((RaceSceneControl)GameRoot.CurrentSceneControl).m_PlayerScoreControl.gameObject.SetActive(false); ((RaceSceneControl)GameRoot.CurrentSceneControl).m_GameComLogo.gameObject.SetActive(false); for (int i = 0; i < 2; i++) { ((RaceSceneControl)GameRoot.CurrentSceneControl).m_WaitMeUI[i].SetActive(false); } m_Background = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("SelectPlayerBackground.prefab", GameRoot.gameResource).GetComponent <Transform>(); m_SelectXiongDaControl = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("SelecetXiongDa.prefab", GameRoot.gameResource).GetComponent <SelectBearControl>(); m_SelectXiongDaControl.Initialization(); m_SelectXiong2Control = GameRoot.uiOrthographicCamera.LoadLanguageResource_UIPrefabs("SelecetXiong2.prefab", GameRoot.gameResource).GetComponent <SelectBearControl>(); m_SelectXiong2Control.Initialization(); }