Пример #1
0
    public void RegistUserInfo()
    {
        Ag.LogIntenseWord(" RegistUserInfo  KKO  ID ::::::  " + Ag.mySelf.WAS.KkoID);

        WasUserInfo aObj = new WasUserInfo()
        {
            User = Ag.mySelf, flag = 1
        };

        aObj.messageAction = (int pInt) => {
            switch (pInt)   // 0:성공
            {
            case 0:
                //UniformInit ();
                //Ag.mVirServer.SetUniform ();
                UniformInit();
                RegistUniform();
                RegCardUpdate();
                break;

            case -1:
            case 4:
                return;
            }
            Ag.mySelf.WAS.profileURL = StcPlatform.ProfileURL;
            AgStt.NodeClose();
            AgStt.NodeOpen();
        };
    }
Пример #2
0
    //public bool IsOK { get { return WAS && Node; } }
    public NetException()
    {
        ConnectLossAct += () => { // WAS Error  or    Time out ...  Lte <--> Wifi
            Ag.LogIntenseWord(" Connection Loss Event ");
            // Gaming ...
            if (Ag.CurrentScene == "GAME")  // ignore ? send leave..  timeout...   //return;
            {
                Ag.NodeObj.LeaveMyself();
            }
            ConnectLossSignalGone = true; // popup open..
        };                                // mUIpopup.SetActive (true);  // NetworkPopup.cs 에서 처리함.

        NodeConnectionLossAct = () => {
            Ag.LogIntenseWord(" Connection Loss Event   @  Node ");

            AgStt.NodeClose();

            // Gaming ...
            if (Ag.CurrentScene == "GAME")
            {
                Ag.LogDouble(" Node Connection Loss Evnt  >>> In GAME <<     .....  _____ ");
                ConnectLossSignalGone = true;
                return;
            }
            // Auto Restart Node ....
            AgStt.NodeOpen();
            Ag.LogDouble(" NetException :: Node   ....   End    .....  _____ ");
        };
    }
Пример #3
0
    public void UserInfo()
    {
        //JCE.JceEventBanner (Ag.mySelf);
        Ag.LogIntenseWord("Login_Register.cs :: UserInfo >>   KKO  ID ::::::  " + Ag.mySelf.WAS.KkoID);

        WasUserInfo aObj = new WasUserInfo()
        {
            User = Ag.mySelf, flag = 1
        };

        aObj.messageAction = (int pInt) => {
            switch (pInt)
            {
            case 0:
                LocalSettingSave();
                PriceItem();
                //Ag.mySelf.CheckFirstDailyEventToday ();
                break;

            case -1:
            case 4:
                return;
            }
            Ag.mySelf.WAS.profileURL = StcPlatform.ProfileURL;
            AgStt.NodeClose();
            AgStt.NodeOpen();
        };
    }
Пример #4
0
    /// <summary>
    /// WithDrawOK
    /// </summary>
    public void Btn_Fun_withDrawOk()
    {
        MenuCommonOpen("Ui_Popup", "game_withdraw", false);
        Ag.mGameStartAlready = false;
        dicMenuList ["CenterCircle"].SetActive(true);
        //AgStt.GoToLoginAfterRegist = false;
        WasUnRegist aObj = new WasUnRegist()
        {
            User = Ag.mySelf
        };

        //AgStt.GoToLoginAfterRegist = false;
        aObj.messageAction = (int pInt) => {
            dicMenuList ["CenterCircle"].SetActive(false);
            switch (pInt)   // 0:성공
            {
            case 0:
                KakaoNativeExtension.Instance.deleteUser(this.onDeleteUserInfoComplete, this.onDeleteUserInfoError);
                KakaoNativeExtension.Instance.Unregister(onUnregisterComplete, onUnregisterError);
                //KakaoNativeExtension.Instance.Logout (onLogoutComplete, onLogoutError);
                Ag.PlatformLogout = true;
                AgStt.NodeClose();

                PreviewLabs.PlayerPrefs.SetBool("DidTutorial", false);  //튜토리얼 모드 ON
                PreviewLabs.PlayerPrefs.Flush();
                Application.LoadLevel("Title");
                break;

            case 1:
                Ag.LogString(" Regist : Success ");

                //AgStt.GoToLoginAfterRegist = true;
                //StNet.Login(Ag.mySelf, out goToLogin);
                break;

            case -1:
            case 4:
                return;
            }
        };
    }
Пример #5
0
    public void Recover()
    {
        ConnectLossSignalGone = false;
        if (WAS.HasValue && WAS.Value)
        {
            WAS = null;
        }
        if (Platform.HasValue && Platform.Value)
        {
            Platform = null;
        }
        //if (Node.HasValue && Node.Value) {
        AgStt.NodeClose();
        AgStt.NodeOpen();

        WasLogin aObj = new WasLogin()
        {
            User = Ag.mySelf, osVer = "1.1"
        };

        aObj.messageAction = (int pInt) => {
            aObj = null;
        };
    }
 public override void OnApplicationQuit()
 {
     Ag.LogIntenseWord(" OnApplicationQuit");
     AgStt.NodeClose();
 }
    public void OnApplicationPause(bool pauseStatus)
    {
        if (AgStt.NetManager == null)
        {
            return;
        }

        Ag.LogIntenseWord(" OnApplicationPause        Status  Going Out ?  ::  " + pauseStatus);

        //#if UNITY_IPHONE
        //if (Application.platform == RuntimePlatform.IPhonePlayer && AgStt.IntendedPause) {
        if (AgStt.IntendedPause)
        {
            Ag.LogIntenseWord(" OnApplicationPause   Skip     AgStt.IntendedPause  is   True    || Intended..     ");
            if (pauseStatus)
            {
                AgStt.NodeClose();
            }
            else
            {
                AgStt.NodeOpen();
                AgStt.IntendedPause = false;
            }
            return;
        }
        //#endif

        if (pauseStatus)    // going out  // iPhone Home Button is pressed ...
        {
            AgStt.NodeClose();

            willReboot = Ag.GameStt.WillLoadTitleScene;

            PauseStartTime = DateTime.Now;

            //if (AgStt.IsGaming.HasValue && AgStt.IsGaming.Value) { // Escape during Gaming..
            //if (Ag.GameStt.WillSendWasGameReport) { // Escape during Gaming..
            //if (Application.loadedLevelName == "GameScene") {
            //GameObject.Find ("MainControllView").GetComponent<GameScene> ().dicGameSceneMenuList ["popup"].SetActive (true);
            //GameObject.Find ("MainControllView").GetComponent<GameScene> ().dicGameSceneMenuList ["alert_out"].SetActive (true);

//                WasGameReport aObj = new WasGameReport () {
//                    User = Ag.mySelf, winnerID = Ag.NetExcpt.GamingEnemyID, loserID = Ag.mySelf.WAS.KkoID,
//                    winPo = Ag.NetExcpt.GamingEnemyPoint, losPo = 0
//                };
//                aObj.messageAction = (int pInt) => {
//                };
//                arrJobs [arrJobs.Count - 1].SendJob ();



            //} else {   502
            //GameObject.Find ("Axis/Camera/Match").GetComponent<MenuManager> ().MenuCommonOpen ("alert_someoneout", "Ui_popup", true);  502
            //}
            //}
        }
        else      // came back
        {
            AgStt.NodeOpen();
            Ag.GameStt.FocusBack();

            if (arrJobs != null)
            {
                arrJobs.Clear();
            }

            if (willReboot)   // || (Ag.mSingleMode && Ag.mVirServer.maiGradeOfBot >= 0)) {
            {
                Ag.LogIntenseWord("  NetworkManager Mono  ::: ... WillLoadTitleScene >>>   true ");
                Application.LoadLevel("Title");
                return;
            }
            if ((DateTime.Now - PauseStartTime).TotalSeconds > 1200)    // 1200  20 minutes
            {
                Ag.PlatformLogout = true;
                Application.LoadLevel("Title");
                return;
            }
            AutoLoginProcess();
        }
    }
Пример #8
0
    public void SetColumnNodeA()
    {
        muiCol = 0;
        muiRow = 1;

        int colN, colEA;


        //  _////////////////////////////////////////////////_    _///////////////////////_    _____  Connection  _____    Ag.NodeObj   _____

        if (GUI.Button(ndGUI.GetRect(muiCol, muiRow++), " Ag.NodeObj "))
        {
            AgStt.NodeOpen();
        }

        //  _////////////////////////////////////////////////_    _///////////////////////_    _____  Connection  _____    Node 1   _____
        if (node1 == null)
        {
            if (GUI.Button(ndGUI.GetRect(muiCol, muiRow++), "ID: " + myUser.WAS.KkoID))
            {
                node1 = new NodeActions(myUser);

                node1.MySocket.MyUser = myUser;
                myUser.ShowMyself();
                //AgStt.NodeOpen ();
                //Ag.NodeObj.MySocket.MyUser = myUser;
            }
            return;
        }
        GUI.Label(myGUI.GetRect(muiCol, muiRow++), " Item " + node1.MyUser.arrItem.Count);
        // //"88894476708738001"; //"88712330645978192"; "APPS_MOOON_0001"; // "AppsTest088";//"APPS_TEST_ID_0003"; // "AppsTest043"; //  "APPS_TEST_ID_0002";
        // 88214690633939121<Rolco>  91278098233517152 <Moon iPAD>  88712330645978192 <Moon> 88159078716546208 <Cho>
        //"90060594732486160"; //"88894476708738001";//"APPS_TEST_ID_0002";  90060594732486160  88306087115705857  90060594732486160 <KimDR>
        Rect nodeR1 = ndGUI.GetRect(muiCol, muiRow++);

        colN  = 0;
        colEA = 4;
        if (GUI.Button(ndGUI.DivideRect(nodeR1, colEA, colN++), "Fnd " + node1.MySocket.arrFriends.Count))      // Friend List
        {
            node1.FriendsInfo(friendList);
        }

        if (GUI.Button(ndGUI.DivideRect(nodeR1, colEA, colN++), "Invite"))
        {
            node1.InviteAFriend(user2.WAS.KkoID);   // node2.MyUser.WAS.KkoID);
        }

//        if (GUI.Button (ndGUI.DivideRect (nodeR1, colEA, colN++), "UserMod")) {
//            node1.UserModify ("ONLINE", statusOnly: true);
//        }

//        if (GUI.Button (ndGUI.DivideRect (nodeR1, colEA, colN++), "Leave")) {
//            node1.LeaveMyself ();
//        }

        //  _////////////////////////////////////////////////_    _____  Login  _____    Net Failure    _____
        Rect rctTmr = myGUI.GetRect(muiCol, muiRow++);

        colN  = 0;
        colEA = 3;


        if (GUI.Button(myGUI.DivideRect(rctTmr, colEA, colN++), "Leave"))
        {
            node1.LeaveMyself();
        }

        if (GUI.Button(myGUI.DivideRect(rctTmr, colEA, colN++), "Close"))
        {
            AgStt.NodeClose();
        }

//        if (GUI.Button (myGUI.DivideRect (rctTmr, colEA, colN++), "Timer")) {
//            node1.MySocket.TimerSet ();
//        }
//
//        if (GUI.Button (myGUI.DivideRect (rctTmr, colEA, colN++), "Cancel")) {
//            node1.MySocket.TimerStop ();
//        }

        //  _////////////////////////////////////////////////_    _____  Node  _____    Exchange    _____
        Rect nodeR2 = ndGUI.GetRect(muiCol, muiRow++);

        colN  = 0;
        colEA = 4;
        if (GUI.Button(ndGUI.DivideRect(nodeR2, colEA, colN++), "Exchange "))
        {
            node1.MySocket.ExchangeInfo();
        }
        chNum = int.Parse(GUI.TextField(ndGUI.DivideRect(nodeR2, colEA, colN++), chNum.ToString(), 5));     // GUI.TextField (myGUI.DivideRect (curRegis, 2, 0), chkTeamName, 15);
        if (GUI.Button(ndGUI.DivideRect(nodeR2, colEA, colN++), "Ex 1 "))
        {
            node1.MySocket.Ex1(chNum);
        }
        if (GUI.Button(ndGUI.DivideRect(nodeR2, colEA, colN++), "Ex 3 "))
        {
            node1.MySocket.Ex3(chNum);
        }

        if (GUI.Button(ndGUI.GetRect(muiCol, muiRow++), myUser.WAS.KkoID + "  " + node1.MySocket.arrGameSend.Count + " : S < Close > R : " +
                       node1.MySocket.arrGameRcvd.Count))
        {
            node1.CloseNet();
            node1 = null;
            return;
        }
        if (GUI.Button(ndGUI.GetRect(muiCol, muiRow++), "All Friends"))
        {
            node1.MySocket.xxActionTempFriends();
        }


        //
        //            Rect nodeR1a = ndGUI.GetRect (muiCol, muiRow++);
        //            colN = 0;
        //            colEA = 4;
        //            if (GUI.Button (ndGUI.DivideRect (nodeR1a, colEA, colN++), "Golden ")) {  // Friend List
        //                node1.GoldenBallEvent ();
        //            }
        //
        //            Rect nodeR2 = ndGUI.GetRect (muiCol, muiRow++);
        //            colN = 0;
        //            int val = node1.GameStartMsgSent.Mine ? 10 : 0;
        //            val += node1.GameStartMsgSent.Enem ? 1 : 0;
        //            if (GUI.Button (ndGUI.DivideRect (nodeR2, 3, colN++), "Prepr")) {
        //                node1.PrepareGame ();
        //            }
        //            if (GUI.Button (ndGUI.DivideRect (nodeR2, 3, colN++), "Start? " + node1.ReceiveGameStartMsgBoth)) {
        //                node1.StartGameMsg ();
        //            }
        //            if (GUI.Button (ndGUI.DivideRect (nodeR2, 3, colN++), "ReMch? " + node1.RematchBoth)) {
        //                node1.Rematch ();
        //            }
        //
        //            Rect nodeR11 = ndGUI.GetRect (muiCol, muiRow++);
        //            colN = 0;
        //            if (GUI.Button (ndGUI.DivideRect (nodeR11, 2, colN++), " < Set Delegate > ")) {
        //                node1.PrepareGame ();
        //            }
        //            if (GUI.Button (ndGUI.DivideRect (nodeR11, 2, colN++), " < Game Message > ")) {
        //                node1.HostGameTurn (1);
        //            }
        //            string hostStr = "Null ";
        //            if (node1.AmHost.HasValue)
        //                hostStr = node1.AmHost.Value ? " Host " : " Vstr ";
        //            if (GUI.Button (ndGUI.GetRect (muiCol, muiRow++), hostStr + node1.MySocket.arrGameSend.Count + " : S < Close > R : " +
        //                node1.MySocket.arrGameRcvd.Count)) {
        //                node1.CloseNet ();
        //                node1 = null;
        //                return;
        //            }

        /*
         * {"name":"JOIN",
         *
         * "args":
         * [
         *
         * {"channel":
         *
         * {"server_id":"1","id":"1_2014050118154511",
         *
         * "user1":{"gameStatus":"ONLINE","id":"90060594732486160","teamName":"sefefesfs",
         * "kkoNick":"Nick2424","league":"PRO_2","contWinTime":"0","strIntArr":"5_5_0_","profileURL":"-","rankIntStr":"3000_0_4000_2_25_9_0_0_5_3_","server_id":"1",
         * "socket_id":"WJFXHJCXZRo0OGw7iPAK","channel_server_id":"1","channel_id":"1_2014050118154511","channel_user_no":"1","client_ip":"183.101.188.21",
         * "created_at":"2014-05-01T09:15:40.645Z"},
         *
         * "user2":{"gameStatus":"ONLINE","id":"91278098233517152","teamName":"MMM","kkoNick":"Nickkkkk","league":"PRO_5","contWinTime":"0","strIntArr":"5_5_5_",
         * "profileURL":"-","rankIntStr":"0_0_3000_0_24_28_0_0_91_101_","server_id":"1","socket_id":"XwIGNsn5hlVftjW_iPAL","channel_server_id":"1","channel_id":"1_2014050118154511",
         * "channel_user_no":"2","client_ip":"183.101.188.21","created_at":"2014-05-01T09:15:41.070Z"},
         * "is_random":false,"is_waiting":false,"to_user_id":"91278098233517152","created_at":"2014-05-01T09:15:45.419Z"},
         *
         * "user":{"gameStatus":"ONLINE","id":"91278098233517152","teamName":"MMM","kkoNick":"Nickkkkk","league":"PRO_5","contWinTime":"0","strIntArr":"5_5_5_","profileURL":"-",
         * "rankIntStr":"0_0_3000_0_24_28_0_0_91_101_","server_id":"1","socket_id":"XwIGNsn5hlVftjW_iPAL","channel_server_id":"1","channel_id":"1_2014050118154511",
         * "channel_user_no":"2","client_ip":"183.101.188.21","created_at":"2014-05-01T09:15:41.070Z"}
         *
         * } // channel
         *
         * ] // args
         *
         * }
         *
         * //*/
    }