protected override void OnInitComponent() { //DebugHelper.StartStopwatch(); m_view_wnd_Popup_Login = new v_Login_Popup_wnd(); m_view_wnd_Popup_Login.InitComponent(m_WinObj); //UIInterface.SetText(m_view_wnd_Popup_Login.m_txtUserName_InputField, PlayerPrefs.GetString("LastLoginUserName", "robot_1")); //UIInterface.SetText(m_view_wnd_Popup_Login.m_txtPassword_InputField, "123456"); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_btnLogin_Button, UIEventType.onClick, OnClickLogin); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_toggleServer_Toggle, UIEventType.onClick, OnClickServerToggle); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_btnStart_Button, UIEventType.onClick, OnClickStart); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_btnTestUI_Button, UIEventType.onClick, OnTestUI); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_btnTestUI2_Button, UIEventType.onClick, OnTestUI2); //UIInterface.AddListener(m_view_wnd_Popup_Login.m_btnTestUI3_Button, UIEventType.onClick, OnTestUI3); //m_Sound = new USound(); //m_Sound.CreateObject(1); //m_Sound.Pause(); //m_Sound.SetPersist(true); //TestDictionaryActionKey test = new TestDictionaryActionKey(); //test.Test(); //m_Password.text ="time:" + DebugHelper.StopStopwatch().ToString(); //测试协程 var coroutine = (CoroutineCom)m_WinObj.AddComponent(typeof(CoroutineCom)); coroutine.OnStartCoroutine(OnTestCoroutine(12, new GameObject())); }
protected override void OnDestroy() { //if(m_Sound!= null) //{ // m_Sound.Destroy(); // m_Sound = null; //} m_view_wnd_Popup_Login = null; }