private void SetWndStyleExt() { switch (mWndStyleExt) { case StyleExt.Alpha: { if (null == WndObject.GetComponent <TweenAlpha>()) { TweenAlpha Ta = WndObject.AddComponent <TweenAlpha>(); Ta.to = 0.0f; Ta.delay = 2.0f; } if (null == WndObject.GetComponent <AutoClose>()) { WndObject.AddComponent <AutoClose>(); } } ChangeWndStyleExt(); break; case StyleExt.Toast: { if (null == WndObject.GetComponent <AutoClose>()) { WndObject.AddComponent <AutoClose>(); } } ChangeWndStyleExt(); break; default: break; } }
void Init() { WndObject.AddComponent <ControlHelper>().ControlHelpUpdate = UpdateTimeCounter; UIEventListener.Get(Control("QuitLevel")).onClick = OnClickBacktoMainTown; UIEventListener.Get(Control("Continue")).onClick = OnClickBtnContinueGame; UIEventListener.Get(Control("SoundBtn")).onClick = OnSoundClick; mPauseRoot = Control("PauseRoot"); mCounter = Control("TimeCounter"); mCounter.SetActive(false); // SoundBtn = Control("SoundBtn"); // SoundBtn.SetActive(false); SeateToScene(); }
void Init() { WndObject.AddComponent <ControlHelper>().ControlHelpUpdate = UpdateTimeCounter; UIEventListener.Get(Control("BtnReturn")).onClick = OnClickBtnBacktoMain; UIEventListener.Get(Control("BtnRevive")).onClick = OnClickBtnRelive; mRoleDeadRoot = Control("RoleDeadRoot"); mCounter = Control("TimeCounter"); mCounter.SetActive(false); RequestReviveInfo(); CreateDropItemGrid(); if (Global.GMeteorInput != null) { Global.GMeteorInput.ResetInput(); } }