コード例 #1
0
 public void CoolTimeChooseOneMoreGameWin()  // I choose try one more game ...
 {
     Ag.LogIntenseWord("  CoolTimeChooseOneMoreGameWin     Reset ...    ");
     etcInfoObj.DtContWin = Ag.Now().AddSeconds(AgStt.CTContWin + 1);
     etcInfoObj.ShowMyself();
     UpdateEtcInfoObj("CoolTimeChooseOneMoreGameWin");
 }
コード例 #2
0
 public void HeartCoolTimeNewGameStarted()
 {
     etcInfoObj.HeartRemainSec = CurrentRemainSec() - AgStt.CTHeartGameHealth;
     etcInfoObj.DtHeart        = Ag.Now();
     etcInfoObj.ShowMyself();
     UpdateEtcInfoObj("HeartCoolTimeNewGameStarted");
 }
コード例 #3
0
    int CurrentRemainSecWithNoLimit()
    {
        int    remainSec   = etcInfoObj.HeartRemainSec;
        double healthAdded = (Ag.Now() - etcInfoObj.DtHeart).TotalSeconds;   // +

        healthAdded *= AgStt.CTHeartRecoverFactor;
        remainSec   += (int)healthAdded;
        return(remainSec);
    }
コード例 #4
0
    public void HeartCoolTimeResetWithNow()
    {
        etcInfoObj.HeartRemainSec = CurrentRemainSecWithNoLimit();

        Ag.LogIntenseWord("  etcInfoObj.HeartCoolTimeResetWithNow  >> remainSec ::  " + etcInfoObj.HeartRemainSec + " with Now ");

        etcInfoObj.DtHeart = Ag.Now();
        etcInfoObj.ShowMyself();
        UpdateEtcInfoObj("HeartCoolTimeResetWithNow");
    }
コード例 #5
0
 public void HeartSetMax()
 {
     etcInfoObj.HeartRemainSec = AgStt.CTHeartMaxSeconds;
     etcInfoObj.DtHeart        = Ag.Now();
     UpdateEtcInfoObj("HeartSetMax");
 }
コード例 #6
0
 public void CoolTimeScoutUse()
 {
     etcInfoObj.DtScout = Ag.Now().AddSeconds(AgStt.CTScout + 1);
     etcInfoObj.ShowMyself();
     UpdateEtcInfoObj("CoolTimeScoutUse");
 }
コード例 #7
0
 public void CoolTimePostingAction()
 {
     etcInfoObj.DtPosting = Ag.Now().AddSeconds(AgStt.CTFacebookPostingLimit + 1);
     etcInfoObj.ShowMyself();
     UpdateEtcInfoObj("CoolTimePostingAction");
 }
コード例 #8
0
    public void SetColumnC()
    {
        int colN = 0, colEA;

        muiCol++;
        muiRow = 0;

        //  _////////////////////////////////////////////////_    _///////////////////////_    _____  ***  _____  column 3  _____
        Rect rect004 = myGUI.GetRect(muiCol, muiRow++);

        int h, m, s;  // 타이머 테스트

        timerObj.TimeLeft(out h, out m, out s);
        GUI.Label(myGUI.DivideRect(rect004, 3, 0), h + ":" + m + ":" + s + "  " + timerObj.DidTimerFinished() + " , " + timerObj.SecondsLeft());

        //  _////////////////////////////////////////////////_    _///////////////////////_    _____  Go to   _____    Node Screen   _____
        if (GUI.Button(myGUI.DivideRect(rect004, 3, 2), "Node >"))
        {
            IsNodeScreen = true;
        }

        colN = 0;
        Rect rectPlugin = myGUI.GetRect(muiCol, muiRow++);
//        if (GUI.Button (myGUI.DivideRect (rectPlugin, 3, colN++), "JailBrk")) {
//            pluginObj.CheckRootingJailbreak ();
//        }
//        if (GUI.Button (myGUI.DivideRect (rectPlugin, 3, 1), "Percent")) {
//            AgUtil.LinearPercentVari (100, 10000, 3800);
//
//        }

        string msggg = "";

        #if UNITY_IPHONE
        if (NotificationServices.deviceToken == null)
        {
            msggg = "null";
        }
        else
        {
            msggg = " Token ";
        }
        #endif
        if (GUI.Button(myGUI.DivideRect(rectPlugin, 3, colN++), msggg))
        {
            JCE.JceNotiTokenSetting(myUser);
        }
        if (GUI.Button(myGUI.DivideRect(rectPlugin, 3, colN++), "Noti " + Ag.arrNoti.Count))
        {
//            arrNoti = NotificationServices.remoteNotifications;
//            for (int k = 0; k < arrNoti.Length; k++) {
//                RemoteNotification curNoti = arrNoti [k];
//                Ag.LogString ("  Notification ::  alertBody > " + curNoti.alertBody + "     userInfo.Count > " + curNoti.userInfo.Count +
//                "   badgeNum > " + curNoti.applicationIconBadgeNumber);
//
//                Ag.arrNoti.Add (new AmNotification () { msg = curNoti.alertBody });
//            }
        }
        if (GUI.Button(myGUI.DivideRect(rectPlugin, 3, colN++), "SendNoti"))
        {
            JCE.JceNotiSendMessage(myUser, " 안드로이드 iOS .. .. ");
        }



        //  _////////////////////////////////////////////////_    _///////////////////////_    _____  SingleTry  _____  Test  _____
        Rect rect005 = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 5;
        if (GUI.Button(myGUI.DivideRect(rect005, colEA, colN++), "Try A"))
        {
            myUser.ShowSingleTry(false).ToString().HtLog();
        }
        if (GUI.Button(myGUI.DivideRect(rect005, colEA, colN++), "Confirm"))
        {
            myUser.ConfirmSingleTry(false);
        }
        if (GUI.Button(myGUI.DivideRect(rect005, colEA, colN++), "Try S"))
        {
            myUser.ShowSingleTry(true).ToString().HtLog();
        }
        if (GUI.Button(myGUI.DivideRect(rect005, colEA, colN++), "Confirm"))
        {
            myUser.ConfirmSingleTry(true);
        }
        if (GUI.Button(myGUI.DivideRect(rect005, colEA, colN++), "Init"))
        {
            myUser.InitSingleTry();
        }

        Rect rect006 = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 5;
        int mm, ss;
        myUser.HeartCoolTime(out mm, out ss);
        mm = myUser.HeartCoolTime();  // %
        if (GUI.Button(myGUI.DivideRect(rect006, colEA, colN++), "H  " + mm + " %, S " + ss))
        {
            myUser.HeartCoolTimeNewGameStarted();
            //myUser.HeartSetMax (); // Set Maximum
        }
        if (GUI.Button(myGUI.DivideRect(rect006, colEA, colN++), " SetMax"))
        {
            myUser.HeartSetMax();
        }
        if (GUI.Button(myGUI.DivideRect(rect006, colEA, colN++), " CurTime"))
        {
            ("   Remain Sec ::   " + myUser.CurrentRemainSec()).HtLog();
        }
        // Scout
//        myUser.ScoutCoolTimeRemain (out mm, out ss);
//        if (GUI.Button (myGUI.DivideRect (rect006, colEA, colN++), "S  " + mm + ":" + ss)) {
//            myUser.CoolTimeScoutUse ();
//        }

        myUser.ContWinCoolTimeRemain(out mm, out ss);
        if (GUI.Button(myGUI.DivideRect(rect006, colEA, colN++), "CW  " + mm + ":" + ss))
        {
            myUser.CoolTimeChooseOneMoreGameWin();
            myUser.ContWinCoolTimeRemainPercent().ToString().HtLog();     // + or - ...
        }


        Rect rect007 = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 4;
        if (GUI.Button(myGUI.DivideRect(rect007, colEA, colN++), "PopupIAPL"))
        {
            WasPopupStoreIAPurchaseList aObj = new WasPopupStoreIAPurchaseList()
            {
                User = myUser
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
        }
        if (GUI.Button(myGUI.DivideRect(rect007, colEA, colN++), "PopupL"))
        {
            WasPopupStoreList aObj = new WasPopupStoreList()
            {
                User = myUser
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
        }
        if (GUI.Button(myGUI.DivideRect(rect007, colEA, colN++), "Popup"))
        {
            WasPopupPurchase aObj = new WasPopupPurchase()
            {
                User = myUser, PopupCode = "DiscHeartDay"
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
            aObj = new WasPopupPurchase()
            {
                User = myUser, PopupCode = "DiscHeartWeek"
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
            aObj = new WasPopupPurchase()
            {
                User = myUser, PopupCode = "DiscHeartMonth"
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
        }
        if (GUI.Button(myGUI.DivideRect(rect007, colEA, colN++), "PopPurchase"))
        {
            WasPopupPurchase aObj = new WasPopupPurchase()
            {
                User = myUser, PopupCode = "DiscGlove"
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
        }

        Rect rctNoti = myGUI.GetRect(muiCol, muiRow++);
        colN = 0;
        if (GUI.Button(myGUI.DivideRect(rctNoti, 3, colN++), "Logout"))
        {
            JCE.JceNotiMessage(myUser, "logout");  // logout, alarmOn, alarmOff
        }
        if (GUI.Button(myGUI.DivideRect(rctNoti, 3, colN++), "Alm : On"))
        {
            JCE.JceNotiMessage(myUser, "alarmOn");  // logout, alarmOn, alarmOff
        }
        if (GUI.Button(myGUI.DivideRect(rctNoti, 3, colN++), "Alm : Off"))
        {
            JCE.JceNotiMessage(myUser, "alarmOff");  // logout, alarmOn, alarmOff
        }



        Rect joy1 = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 4;
        if (GUI.Button(myGUI.DivideRect(joy1, colEA, colN++), "JCE"))      //
        //JoyLogin jObj = new JoyLogin ();

        {
            JCE.JceUrgentNoticePT(myUser);
        }
        if (GUI.Button(myGUI.DivideRect(joy1, colEA, colN++), "Img"))      //
        {
            JCE.JceImageNotice(myUser);
        }
        if (GUI.Button(myGUI.DivideRect(joy1, colEA, colN++), "Text"))      //
        //JCE.JceEventBanner (myUser);
        {
            JCE.JceTextNoticePT(myUser);
        }
        if (GUI.Button(myGUI.DivideRect(joy1, colEA, colN++), "Event"))      //
        //JCE.JceEventBanner (myUser);
        {
            JCE.JceEventBanner(myUser);
        }
//        if (GUI.Button (myGUI.DivideRect (joy1, colEA, colN++), "Test")) {  //
//            int wid1, wid2;
//            WasCard was = myUser.arrCard [2].WAS;
//            myUser.arrCard [2].GetSkillWidth (false, out wid1, out wid2);
//            ("   Wid1, wid2  ::   " + was.condition + "  " + was.skill [0] + "  / " + was.skill [1] + "  >>> " + wid1 + " / " + wid2).HtLog ();
//            myUser.arrCard [2].GetSkillWidth (true, out wid1, out wid2);
//            ("  drink on   Wid1, wid2  ::   " + wid1 + "   " + wid2).HtLog ();
//
//        }


        //  _////////////////////////////////////////////////_    _____  Code Only  _____  Packet Send  _____
        Rect joy2 = myGUI.GetRect(muiCol, muiRow++);
        colN      = 0;
        colEA     = 3;
        packetNum = int.Parse(GUI.TextField(myGUI.DivideRect(joy2, colEA, colN++), packetNum.ToString(), 5));
        if (GUI.Button(myGUI.DivideRect(joy2, colEA, colN++), "Send"))      //
        {
            WasCodeOnlyProtocol aObj = new WasCodeOnlyProtocol()
            {
                User = Ag.mySelf, protoCode = packetNum
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
        }
        if (GUI.Button(myGUI.DivideRect(joy2, colEA, colN++), "TEST"))      //
        {
            WasPurchaseItem aObj = new WasPurchaseItem()
            {
                User       = myUser,
                itemType   = "HEARTUPGRADE",
                itemTypeId = "HeartSpeedUp", //"HeartLimitUp",
                ea         = 1,
            };
            aObj.messageAction = (int pInt) => {
                aObj = null;
            };
//            WasHeartFillMax aObj = new WasHeartFillMax () { User = myUser };
//            aObj.messageAction = (int pInt) => {
//                aObj = null;
//            };
        }

        Rect corot = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 4;
        if (GUI.Button(myGUI.DivideRect(corot, colEA, colN++), "Corout"))      //
        {
            StartCoroutine("SomeCrtine");
        }
        if (GUI.Button(myGUI.DivideRect(corot, colEA, colN++), "End"))      //
        {
            StopCoroutine("SomeCrtine");
        }

        #if UNITY_IPHONE
        //  _////////////////////////////////////////////////_    _____  Purchase  _____    IAP   _____
        string iapMsg = "N : " + AgStt.mIAP.arrProduct.Count + "  Psble : " + AgStt.mIAP.CanMakePayment();
        GUI.Label(myGUI.GetRect(muiCol, muiRow++), iapMsg);

        Rect iap1   = myGUI.GetRect(muiCol, muiRow++);
        int  colNum = 3;
        int  col    = 0;

        if (GUI.Button(myGUI.DivideRect(iap1, colNum, col++), "IAP:Init"))      //
        {
            AgStt.mIAP.ProductRequest();
        }

        if (GUI.Button(myGUI.DivideRect(iap1, colNum, col++), "cash0030"))      //
        {
            AgStt.mIAP.PurchaseProduct("com.appsgraphy.psykickbattlekakao.cash0030");
        }
        #endif
        //  _////////////////////////////////////////////////_    _____  Code  _____  Etc Test  _____
        Rect joy9 = myGUI.GetRect(muiCol, muiRow++);
        colN  = 0;
        colEA = 3;

        if (GUI.Button(myGUI.DivideRect(joy9, colEA, colN++), " SetNow "))
        {
            testDT = DateTime.Now;
            Ag.LogIntenseWord("    Now is " + testDT + "   Ag. Now () :: " + Ag.Now());
            Ag.LogIntenseWord("    Diff is " + (testDT - Ag.Now()).TotalSeconds);
        }

        if (GUI.Button(myGUI.DivideRect(joy9, colEA, colN++), " Time "))
        {
            Ag.LogIntenseWord("  Total Seconds  ... " + Ag.TotalSecondsHavePassedInSeoulSince(testDT));
        }
    }
コード例 #9
0
    bool ParseUserProp(JSONNode pData)
    {
        string header = "  ParseUserProp ::>>   ";

        try {
            Ag.LogStartWithStr(1, header + " Country , League, etcInfo, freeCoupon ");
            WAS.Country = pData ["country"].AsInt;
            try {
                WAS.TeamName = pData ["teamName"];
            } catch {
                " Team Name Error.  ".HtLog();
            }
            pData.ParseTo("league", out WAS.League, "etcInfo", out WAS.etcInfo);
            try {
                FreeCouponTime = long.Parse(pData ["freeCouponDate"]) / 1000;  // formatVersion 1 : yyyyMMddHHmmss .. parse ..
                FreeCouponDT   = Ag.UnixTimeStampToDateTime(FreeCouponTime);

                Ag.LogString("  freeCouponDate : " + pData ["freeCouponDate"]);  // Ag.UnixTimeStampToDateTime (
                Ag.LogString("  FreeCouponDT : " + FreeCouponDT + "   Remain Sec   " + FreeCouponTS.TotalSeconds + "  IsFreeCouponRemain ? " + IsFreeCouponRemain);
            } catch {
                FreeCouponTime = Ag.TimeNow;
                " Free Coupon Date Not Set  >>  set to now  ".HtLog();
            }
        } catch {
            Ag.LogIntenseWord(" [< AmUserNet.cs >]       Parse User Info  [ Country, league, freeCoupon  ] >>>>>  E R R O R  :: ");
        }

        if (WAS.League == null || WAS.League.Length < 3)
        {
            WAS.League = "PRO_5";
        }

        try {
            pData.ParseTo("cost", out WAS.Cost, "reviewEvent", out WAS.reviewEvent);  // 리뷰 확인 0: 아직 안함, 1: 함..
            pData.ParseTo("gold", out mGold, "cash1", out mCash1, "cash2", out mCash2);
            (header + " gold / cash1 / cash2  " + mGold + "  " + mCash1 + "  " + mCash2).HtLog();
        } catch {
            Ag.LogIntenseWord(" [< AmUserNet.cs >]       Parse User Info  [ cost, review, gold/cash  ] >>>>>  E R R O R  :: ");
            return(false);
        }

        if (pData ["etcInfo"].ToString().IsJsonNull())
        {
            "   etcInfo is NULL  Reset ... and Update   ".HtLog();
            etcInfoObj = new WasUserEtcInfo();
            DateTime dtNow = DateTime.Now;
            etcInfoObj.DailyChkMon = dtNow.Month;
            etcInfoObj.DailyChkDay = dtNow.Day;

            etcInfoObj.HeartRemainSec = AgStt.CTHeartMaxSeconds;
            etcInfoObj.DtHeart        = Ag.Now();

            UpdateEtcInfoObj("Parsing ..  JsonNull");
        }
        else
        {
            try {
                (header + "   etcInfo  :  " + pData ["etcInfo"]).HtLog();
                //etcInfoObj = JsonMapper.ToObject<WasUserEtcInfo> (pData ["etcInfo"].ToJson ().RecoverFromDodge ().RemoveHeadFootOneChar ());
                etcInfoObj = new WasUserEtcInfo();
                etcInfoObj.Parse(JSON.Parse(pData ["etcInfo"].ToString().RecoverFromDodge().RemoveHeadFootOneChar()));
                etcInfoObj.ShowMyself();
            } catch {
                Ag.LogIntenseWord(" [< AmUserNet.cs >]       Parse etc Info >>>>>  E R R O R  ::  Read etcInfo  ");
            }
        }
        try {
            ("  My Rank : " + pData ["myRank"].ToString()).HtLog();
            myRank = new Rank(pData ["myRank"]);  // JsonMapper.ToObject<WasRank> (pData ["myRank"].ToJson ()); //.HtLog ();
        } catch {
            Ag.LogIntenseWord(" [< AmUserNet.cs >]       Parse Rank   >>>>>  E R R O R  :: ");
        }
        //Ag.LogString (" FreeCoupon ::   " + WAS.freeCouponDate + "   Length : " + WAS.freeCouponDate.Length);

        //FreeCouponLimitDT = WAS.freeCouponDate.ToDateTime ();
//        if (WAS.freeCouponDate.Length > 5) { // < 10) {
//            try {
//                FreeCouponLimitDT = WAS.freeCouponDate.ToDateTime ();
//            } catch {
//                FreeCouponLimitDT = DateTime.Now;
//            }
//        } else
//            FreeCouponLimitDT = DateTime.Now;

        Ag.LogString(header + WAS.TeamName + "     has      Cash : " + mCash1 + " / " + mCash2 + "         Gold : " + mGold +
                     "     Review : " + WAS.reviewEvent + "     Cost : " + WAS.Cost + "  in league : " + WAS.League);
        Ag.LogString(header + WAS.TeamName + "     etcInfo :: " + WAS.etcInfo);
        myRank.WAS.ShowMyself();
        Ag.LogIntense(2, false);
        return(true);
    }