Beispiel #1
0
	void CancelAccountDeleteOK()
	{
		//	account delete cancel and send login
		GameObject go = GameObject.Find( "LoginFramework");
		if( null != go)
		{
			AsLoginScene loginScene = go.GetComponentInChildren<AsLoginScene>();
			if( null != loginScene)
			{
				AsUserInfo.Instance.isAccountDeleteCancel = true;

				if( WemeSdkManager.Instance.IsWemeLogin == true )
				{
					loginScene.WemeLogin();
				}
				else
				{
					AS_CL_LOGIN login = new AS_CL_LOGIN( AsUserInfo.curID, AsUserInfo.curPass,AsUserInfo.Instance.isAccountDeleteCancel);
					byte[] data = login.ClassToPacketBytes();
					AsNetworkMessageHandler.Instance.Send( data);
					
					if( true == AssetbundleManager.Instance.useAssetbundle)
						AssetbundleManager.Instance.SceneAssetbundleLoadCache( "ServerSelect");
					
					AsUserInfo.Instance.isAccountDeleteCancel = false;
				}
			}
		}
	}
	private void OnBackBtn()
	{
		if( true == AssetbundleManager.Instance.useAssetbundle)
		{
			if( true == AssetbundleManager.Instance.isOpenPatchChoiceMsgBox())
				return;
		}

		if( true == CharacterSelected)
			return;

		AsSoundManager.Instance.PlaySound( "Sound/Interface/S6002_EFF_Button", Vector3.zero, false);
		//2014.05.16
		//if( true == WemeSdkManager.Instance.IsGuest)
		//	return;

		if( true == toBack)
			return;

		//#15883 dopamin
		if( false == IsModelAllLoaded())
			return;

		toBack = true;
		AsUserInfo.Instance.Clear();
		AsNotify.Instance.CloseAllMessageBox();
		AsCharacterSlotManager.autoSelected = false;

		AsNetworkManager.Instance.ConnectToServer( AsNetworkDefine.LOGIN_SERVER_IP, AsNetworkDefine.LOGIN_SERVER_PORT, SOCKET_STATE.SS_LOGIN);
		if( true == AsNetworkManager.Instance.IsConnected())
		{
			if( true == AsUserInfo.Instance.isWemeCertified)
			{
				WemeRelogin();
			}
			else
			{
				AS_CL_LOGIN login = new AS_CL_LOGIN( AsUserInfo.curID, AsUserInfo.curPass,AsUserInfo.Instance.isAccountDeleteCancel);
				byte[] data = login.ClassToPacketBytes();
				AsNetworkMessageHandler.Instance.Send( data);

				if( true == AssetbundleManager.Instance.useAssetbundle)
					AssetbundleManager.Instance.SceneAssetbundleLoadCache( "ServerSelect");

				AsUserInfo.Instance.isAccountDeleteCancel = false;
			}

			if( null != AssetbundleManager.Instance && true == AssetbundleManager.Instance.useAssetbundle)
				AssetbundleManager.Instance.SceneAssetbundleLoadCache( "Login");
		}
	}
Beispiel #3
0
	private void OnBtnLogin()
	{
		AsSoundManager.Instance.PlaySound( "S6002_EFF_Button", Vector3.zero, false);

		Debug.Log( "Connect to login server... " + ip + " " + AsNetworkDefine.LOGIN_SERVER_PORT);

		AsNetworkManager.Instance.ConnectToServer( IP, AsNetworkDefine.LOGIN_SERVER_PORT, SOCKET_STATE.SS_LOGIN);
		if( true == AsNetworkManager.Instance.IsConnected())
		{
			AsUserInfo.curID = ID;
			AsUserInfo.curPass = Password;

			AS_CL_LOGIN login = new AS_CL_LOGIN( ID, Password,AsUserInfo.Instance.isAccountDeleteCancel);
			byte[] data = login.ClassToPacketBytes();
			AsNetworkMessageHandler.Instance.Send( data);

			if( true == AssetbundleManager.Instance.useAssetbundle)
				AssetbundleManager.Instance.SceneAssetbundleLoadCache( "ServerSelect");

			AsUserInfo.Instance.isAccountDeleteCancel = false;

			PlayerPrefs.SetString( "ArkSphereID", ID);
			PlayerPrefs.SetString( "ArkSpherePass", Password);
			PlayerPrefs.Save();

			btnLogin.SetControlState( UIButton.CONTROL_STATE.DISABLED);
		}
		else {
			Debug.Log("couldn't connect server!!!");
		}
	}