private void detectCurBtn() { if (curButton != null) { RectTransform crt = curButton.transform as RectTransform; if (crt.anchoredPosition.y < -290) { if (curButton != quitButton) { panelCenter.showGamePanel(); Destroy(gameObject);//销毁首页界面 } else { Destroy(gameObject);//销毁首页界面 Process.GetCurrentProcess().Kill(); } } } }
private void deteCurBtn() { if (curBtn != null) { RectTransform rtf = curBtn.transform as RectTransform; if (rtf.anchoredPosition.y < curBtnOutY) { if (curBtn == button2) { panelCenter.showGamePanel(); } else if (curBtn == button3) { Application.Quit(); } else if (curBtn == button1) { panelCenter.showGame2Panel(); } Destroy(gameObject); } } }
public override void enter() { pc = PanelCenter.Instance; pc.showGamePanel(); }