public static void addEditProfileErrorAlertView(AlertViewScript.TouchCallBack touchCallBack) { if (null != GameObject.Find(SpriteNameConst.EDIT_PROFILE_ERROR_ALERT_VIEW_NAME)) return; Transform prefab = Resources.Load<Transform>("prefab/alertView/alertView"); Transform transform = Instantiate(prefab, new Vector3(0, 1, 1), Quaternion.identity) as Transform; transform.gameObject.name = SpriteNameConst.EDIT_PROFILE_ERROR_ALERT_VIEW_NAME; AlertViewScript alertViewScript = transform.GetComponent<AlertViewScript>(); CanvasHelper.setOtherCanvasTouchEnabled(transform, false); alertViewScript.setInfo("更新失败,请重新输入!"); alertViewScript.setTouchCallBack(touchCallBack); }
public static void addLoginSuccessAlertView(AlertViewScript.TouchCallBack touchCallBack) { if (null != GameObject.Find(SpriteNameConst.LOGIN_SUCCESS_ALERT_VIEW_NAME)) return; Transform prefab = Resources.Load<Transform>("prefab/alertView/alertView"); Transform transform = Instantiate(prefab, new Vector3(0, 1, 1), Quaternion.identity) as Transform; transform.gameObject.name = SpriteNameConst.LOGIN_SUCCESS_ALERT_VIEW_NAME; AlertViewScript alertViewScript = transform.GetComponent<AlertViewScript>(); CanvasHelper.setOtherCanvasTouchEnabled(transform, false); alertViewScript.setInfo("登录成功"); alertViewScript.setTouchCallBack(touchCallBack); }
public void loginSuccessAlertViewOkTapped(AlertViewScript script) { AlertViewHelper.removeLoginSuccessAlertView(); string userName = GameObject.Find("userNameInputField").GetComponent<InputField>().text; string password = GameObject.Find("passwordInputField").GetComponent<InputField>().text; LoginTypeHelper.setLocalLoginTypeRegisteredUser(); LoginTypeHelper.setLocalLoginTypeRegisteredUserName(userName); LoginTypeHelper.setLocalLoginTypeRegisteredPassword(password); SceneHelper.switchToScene("main"); }
public void editProfileSuccessAlertViewOkTapped(AlertViewScript script) { AlertViewHelper.removeEditProfileSuccessAlertView(); }
//进桌子错误按钮 public void sitOnDeskErrorOkTapped(AlertViewScript script) { AlertViewHelper.removeSitOnDeskErrorAlertView(); SceneHelper.switchSceneBack(); }
public void loginErrorAlertViewOkTapped(AlertViewScript script) { AlertViewHelper.removeLoginErrorAlertView(); }
public void sitOnDeskErrorOkTapped(AlertViewScript script) { AlertViewHelper.removeSitOnDeskErrorAlertView(); }
public void registerErrorAlertViewOkTapped(AlertViewScript script) { AlertViewHelper.removeRegisterErrorAlertView(); }
void disableLeaveAlertViewOkTapped(AlertViewScript script) { AlertViewHelper.removeDisableLeaveAlertView(); }