コード例 #1
0
ファイル: netConnect.cs プロジェクト: bigstupidx/JSBU
    public void connectnet(bool isAccountLand, bool isYouKe, bool isWeiXin)
    {
        httpConnect.isLand = true;//登陆则改为true
        if (isYouKe)
        {
            //httpConnect.GET(this, httpConnect.URL + "/user/loginByDeviceId?deviceId=8888", null, userLand, httpError);//实现游客登陆,得到token号,连接到服务器 + SystemInfo.deviceUniqueIdentifier
            httpConnect.GET(this, httpConnect.URL + "/user/loginByDeviceId?deviceId=" + SystemInfo.deviceUniqueIdentifier, null, userLand, httpError);//  实现游客登陆,得到token号,连接到服务器 + SystemInfo.deviceUniqueIdentifier
            m_state = login_state.visitor;
        }
        if (isWeiXin)
        {
#if UNITY_ANDROID
            weiXinLoad.androidObject.Call("LoginWeiXin");
            httpConnect.isLand = true;//登陆则改为true
#endif
#if UNITY_IPHONE
            if (UnitySendMessageToiOS.Instante().wxLogon() == 0)
            {
                print("登陆成功");
            }
            else
            {
                print("请安装或更微信");
            }
#endif
            m_state = login_state.wechat;
        }
    }
コード例 #2
0
ファイル: state_machine.cs プロジェクト: yangwenlong/ywl
 private void init_all_states()
 {
     State login_state = new login_state (STATE_ID.LOGIN_STATE, this);
     State select_room_state = new select_room_state (STATE_ID.SELECT_ROOM_STATE, this);
     State hall_state = new hall_state (STATE_ID.HALL_STATE, this);
     State create_room_state = new create_room_state (STATE_ID.CREATE_ROOM_STATE, this);
 }