Exemple #1
0
    public void RegisterForRemoteNotifications(NotificationType notificationTypes)
    {
        ;
        #endif



                #if (UNITY_IPHONE && !UNITY_EDITOR && PUSH_ENABLED) || SA_DEBUG_MODE
        string sysInfo = SystemInfo.operatingSystem;
        sysInfo = sysInfo.Replace("iPhone OS ", "");
        string[] chunks       = sysInfo.Split('.');
        int      majorVersion = int.Parse(chunks[0]);
        if (majorVersion >= 8)
        {
            _ISN_RegisterForRemoteNotifications((int)notificationTypes);
        }

                #if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6
        NotificationServices.RegisterForRemoteNotificationTypes(notificationTypes);
                #else
        NotificationServices.RegisterForNotifications(notificationTypes);
                #endif

        DeviceTokenListener.Create();
                #endif
    }
Exemple #2
0
 public void RegisterForRemoteNotifications(RemoteNotificationType notificationTypes)
 {
             #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE
     NotificationServices.RegisterForRemoteNotificationTypes(notificationTypes);
     DeviceTokenListner.Create();
             #endif
 }
Exemple #3
0
//    public IEnumerator Awake ()
//    {
//        return 0;
//        //base.Awake ();
//        //DontDestroyOnLoad (this.gameObject);
//    }
    // Use this for initialization



    public override void Start()
    {
        //Ag.GameStt.TitleSceneBegan ();

        base.Start();
        //CheckWasServerVision ();
        //Debug.Log ("Getbool" + PreviewLabs.PlayerPrefs.GetBool ("BgmSoundOff"));
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        #if UNITY_IPHONE
        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
        Ag.LogIntenseWord("NotificationServices.  Register For Remote NotificationTypes  ");
        #endif

        ("  Title :: Start    ").HtLog();
        //Ag.mFBOrder = "ConNet";
        GameInit();
        StartCoroutine(WaitAndPrint());
        JCE.JceUrgentNoticePT(Ag.mySelf);
        JCE.JceTextNoticePT(Ag.mySelf);


        if (AgUtil.IsLGeVuModel())
        {
            Screen.SetResolution((Screen.height / 2) * 3, Screen.height, true);
        }
    }
    IEnumerator CreateIosInstalliation()
    {
        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert
                                                                | RemoteNotificationType.Badge
                                                                | RemoteNotificationType.Sound);

        //wait for token
        while (NotificationServices.deviceToken == null)
        {
            yield return(null);
        }

        Debug.Log("parse notification Token gotten");
        var token       = NotificationServices.deviceToken;
        var tokenString = System.BitConverter.ToString(token).Replace("-", "").ToLower();
        var obj         = CreateInstallationObject(tokenString, "ios");

        obj.SaveAsync().ContinueWith(t =>
        {
            if (t.IsFaulted || obj.ObjectId == null)
            {
                Debug.LogError("save parse installiation failed");
            }
            else
            {
                Debug.LogError("save parse installiation ok");
                PlayerPrefs.SetString("currentInstallation", obj.ObjectId);
            }
        });
    }
    //初始化 数据统计
    public void InitAccount()
    {
        Server        curServer = Core.SM.curServer;
        PlayerManager player    = Core.Data.playerManager;

                #if UNITY_ANDROID && !UNITY_EDITOR
        if (account == null)
        {
            AndroidJavaClass  unityClass = new AndroidJavaClass(UNTIFY_CLASS);
            AndroidJavaObject activity   = unityClass.GetStatic <AndroidJavaObject>("currentActivity");
            activity.Call("runOnUiThread", new AndroidJavaRunnable(() => {
                TalkingDataGA.OnStart(TDataAppId, curServer.id.ToString());
                account = TDGAAccount.SetAccount(player.PlayerID.ToString());
                account.SetGameServer(curServer.id.ToString());
                account.SetLevel(player.Lv);
            }));
        }
        #endif

                #if UNITY_IPHONE
        NotificationServices.RegisterForRemoteNotificationTypes(
            RemoteNotificationType.Alert |
            RemoteNotificationType.Badge |
            RemoteNotificationType.Sound
            );


        TalkingDataGA.OnStart(TDataAppId, curServer.id.ToString());
        account = TDGAAccount.SetAccount(player.PlayerID.ToString());
        account.SetGameServer(curServer.id.ToString());
        //account.SetLevel(player.Lv);
        #endif
    }
    // Use this for initialization
    void Awake()
    {
#if UNITY_IOS
        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert |
                                                                RemoteNotificationType.Badge |
                                                                RemoteNotificationType.Sound);
#endif

        ParsePush.ParsePushNotificationReceived += (sender, args) => {
#if UNITY_ANDROID
            AndroidJavaClass  parseUnityHelper = new AndroidJavaClass("com.parse.ParsePushUnityHelper");
            AndroidJavaClass  unityPlayer      = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            AndroidJavaObject currentActivity  = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity");

            // Call default behavior.
            parseUnityHelper.CallStatic("handleParsePushNotificationReceived", currentActivity, args.StringPayload);
#elif UNITY_IOS
            IDictionary <string, object> payload = args.Payload;

            foreach (var key in payload.Keys)
            {
                Debug.Log("Payload: " + key + ": " + payload[key]);
            }
#endif
        };
    }
 public void RegisterForRemoteNotifications(UnityEngine.iOS.NotificationType notificationTypes)
 {
             #if (UNITY_IPHONE && !UNITY_EDITOR && PUSH_ENABLED) || SA_DEBUG_MODE
     NotificationServices.RegisterForRemoteNotificationTypes(notificationTypes);
     DeviceTokenListner.Create();
             #endif
 }
    private void Init()
    {
#if UNITY_IPHONE || NEW_EGSDK_IOS
        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert |
                                                                RemoteNotificationType.Badge |
                                                                RemoteNotificationType.Sound);
#endif

        //第一次进入游戏的时候清空,有可能用户自己把游戏冲后台杀死,这里强制清空
        CleanNotification();
    }
Exemple #9
0
        // Fired when a remote notification is received or game was launched from a remote notification
        // public static event Action<Hashtable> remoteNotificationReceived;
        // --------



        public void OnStart()
        {
            // Need to call register on EVERY start of the application
            //
            // At some time in the future this call will cause NotificationServices.deviceToken to be set to
            // a usefull value. Since we dont know when this will happen we have to watch for it inside the OnUpdate
            // function
            NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert |
                                                                    RemoteNotificationType.Badge |
                                                                    RemoteNotificationType.Sound);

            remoteRegistrationSucceeded += registerWithUrbanAirship;
        }
Exemple #10
0
    void Start()
    {
        Debug.Log("start...!!!!!!!!!!");
#if UNITY_IPHONE
        NotificationServices.RegisterForRemoteNotificationTypes(
            RemoteNotificationType.Alert |
            RemoteNotificationType.Badge |
            RemoteNotificationType.Sound
            );
#endif
        TalkingDataGA.OnStart(TDataAppId, "your_channel_id");
        account = TDGAAccount.SetAccount("User01");
    }
Exemple #11
0
    protected void RegisterForPushNotificationsIOS()
    {
        try {
            _swrveiOSRegisterForPushNotifications(Json.Serialize(config.pushCategories.Select(a => a.toDict()).ToList()));
        } catch (Exception exp) {
            SwrveLog.LogWarning("Couldn't invoke native code to register for push notifications, make sure you have the iOS plugin inside your project and you are running on a iOS device: " + exp.ToString());

#if UNITY_5
            NotificationServices.RegisterForNotifications(NotificationType.Alert | NotificationType.Badge | NotificationType.Sound);
#else
            NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
#endif
        }
    }
    /// <summary>
    /// Init this instance.
    /// </summary>
    public void Init()
    {
        //DateTime dt =
        string strTicks = PlayerPrefs.GetString(TOKEN_KEY);
        long   dtTicks  = strTicks == "" ? 0 : long.Parse(strTicks);

        if (DateTime.Now.Ticks - dtTicks >= 24L * 3600L * 60L * 1000L * 10000L)
        {
            NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert |
                                                                    RemoteNotificationType.Badge |
                                                                    RemoteNotificationType.Sound);
            StartCoroutine("RegistRemote");
            PlayerPrefs.SetString(TOKEN_KEY, "" + DateTime.Now.Ticks);
        }
    }
        void Start()
        {
            PlayGameServices.enableDebugLog(true);

#if UNITY_IOS
            // we always want to call init as soon as possible after launch. Be sure to pass your own clientId to init!
            // This call is not required on Android.
            PlayGameServices.init("160040154367.apps.googleusercontent.com", true);

            // on iOS we will need to register for push notifications and send the device token to Google so they can send out
            // push notifications on your behalf
            Debug.Log("registering for push notifications");
            NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
#endif
        }
        private void RegisterDevice()
        {
#if UNITY_ANDROID
            if (string.IsNullOrEmpty(GoogleConsoleProjectId))
            {
                Debug.Log("sender id is null");
                return;
            }
            GCM.Register((regId) =>
            {
                if (string.IsNullOrEmpty(regId))
                {
                    ResultText.text = string.Format("Failed to get the registration id");
                    return;
                }

                ResultText.text = string.Format(@"Your registration Id is = {0}", regId);

                SnsClient.CreatePlatformEndpointAsync(
                    new CreatePlatformEndpointRequest
                {
                    Token = regId,
                    PlatformApplicationArn = AndroidPlatformApplicationArn
                },
                    (resultObject) =>
                {
                    if (resultObject.Exception == null)
                    {
                        CreatePlatformEndpointResponse response = resultObject.Response;
                        _endpointArn     = response.EndpointArn;
                        ResultText.text += string.Format(@"Platform endpoint arn is = {0}", response.EndpointArn);
                    }
                }
                    );
            }, GoogleConsoleProjectId);
#elif UNITY_IOS
#if UNITY_5
            UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound);
#else
            NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
#endif
            CancelInvoke("CheckForDeviceToken");
            InvokeRepeating("CheckForDeviceToken", 1f, 1f);
#endif
        }
Exemple #15
0
    void Start()
    {
        Debug.Log("start...!!!!!!!!!!");
#if UNITY_IPHONE
#if UNITY_5
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(
            UnityEngine.iOS.NotificationType.Alert |
            UnityEngine.iOS.NotificationType.Badge |
            UnityEngine.iOS.NotificationType.Sound);
#else
        NotificationServices.RegisterForRemoteNotificationTypes(
            RemoteNotificationType.Alert |
            RemoteNotificationType.Badge |
            RemoteNotificationType.Sound);
#endif
#endif
        TalkingDataGA.OnStart("B54977E570492ED5B2CEDD9B3D69C16B", "your_channel_id");
        account = TDGAAccount.SetAccount("User01");
    }
 /// <summary>
 /// Registers for push notifications.
 /// </summary>
 public void RegisterForPushNotifications()
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer)
     {
     #if UNITY_IPHONE
     #if UNITY_4_5 || UNITY_4_6 || UNITY_4_7
         NotificationServices.RegisterForRemoteNotificationTypes(
             RemoteNotificationType.Alert |
             RemoteNotificationType.Badge |
             RemoteNotificationType.Sound);
     #else
         UnityEngine.iOS.NotificationServices.RegisterForNotifications(
             UnityEngine.iOS.NotificationType.Alert |
             UnityEngine.iOS.NotificationType.Badge |
             UnityEngine.iOS.NotificationType.Sound);
     #endif
     #endif
     }
 }
    void Start()
    {
        Debug.Log("start...!!!!!!!!!!");
#if UNITY_IPHONE
#if UNITY_5
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(
            UnityEngine.iOS.NotificationType.Alert |
            UnityEngine.iOS.NotificationType.Badge |
            UnityEngine.iOS.NotificationType.Sound);
#else
        NotificationServices.RegisterForRemoteNotificationTypes(
            RemoteNotificationType.Alert |
            RemoteNotificationType.Badge |
            RemoteNotificationType.Sound);
#endif
#endif
        TalkingDataGA.OnStart("0A33A9FA393A4EC898A788FC293DDD94", "your_channel_id");
        account = TDGAAccount.SetAccount("User01");
    }
Exemple #18
0
        private void RegisterForNotifications()
        {
            m_initRemoteNotifications = Settings.Instance.PushNotificationsEnabledIOS && m_pushEnabled;

            //Workaround for a bug in some versions of Unity: http://forum.unity3d.com/threads/local-notification-not-working-in-ios-8-unity4-5-4-xcode6-0-1.271487/
            if (!_UT_RegisterForIOS8(m_initRemoteNotifications))
            {
#if UNITY_5_PLUS
                NotificationServices.RegisterForNotifications(NotificationType.Badge | NotificationType.Alert | NotificationType.Sound, m_initRemoteNotifications);
#else
#if UNITY_4_6_PLUS
                NotificationServices.RegisterForLocalNotificationTypes(LocalNotificationType.Badge | LocalNotificationType.Alert | LocalNotificationType.Sound);
#endif
                if (m_initRemoteNotifications)
                {
                    NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Badge | RemoteNotificationType.Alert | RemoteNotificationType.Sound);
                }
#endif
            }
        }
    void Start()
    {
        //ret += "start...!!!!!!!!!!" + "\n";
#if UNITY_IPHONE
#if UNITY_5 || UNITY_5_6_OR_NEWER
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(
            UnityEngine.iOS.NotificationType.Alert |
            UnityEngine.iOS.NotificationType.Badge |
            UnityEngine.iOS.NotificationType.Sound);
#else
        NotificationServices.RegisterForRemoteNotificationTypes(
            RemoteNotificationType.Alert |
            RemoteNotificationType.Badge |
            RemoteNotificationType.Sound);
#endif
#endif
        TalkingDataGA.OnStart("D9842FE72860480EA4A0735BEF152DEB", "Alpha");

        //文档
        //http://doc.talkingdata.com/posts/65
    }
        private static void RegisterForRemoteNotifications()
        {
            //NotificationServices.RegisterForRemoteNotificationTypes(GamedoniaPushNotifications.notificationType);

            if (GamedoniaPushNotifications.Instance.enableBadge)
            {
                notificationType |= RemoteNotificationType.Badge;
            }
            if (GamedoniaPushNotifications.Instance.enableAlert)
            {
                notificationType |= RemoteNotificationType.Alert;
            }
            if (GamedoniaPushNotifications.Instance.enableSound)
            {
                notificationType |= RemoteNotificationType.Sound;
            }

            string sysInfo = SystemInfo.operatingSystem;

            sysInfo = sysInfo.Replace("iPhone OS ", "");
            string[] chunks       = sysInfo.Split('.');
            int      majorVersion = int.Parse(chunks[0]);

            if (majorVersion >= 8)
            {
                if (Instance.debug)
                {
                    Debug.Log("[Register Notification] major Version > 8");
                }
                _RegisterForRemoteNotifications((int)GamedoniaPushNotifications.notificationType);
            }
            else
            {
                if (Instance.debug)
                {
                    Debug.Log("[Register Notification] Unity Standard registration process");
                }
                NotificationServices.RegisterForRemoteNotificationTypes(GamedoniaPushNotifications.notificationType);
            }
        }
Exemple #21
0
    private IEnumerator SetupPushNotifications()
    {
        FuseLog("SetupPushNotifications()");

#if UNITY_4
        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
#else
        UnityEngine.iOS.NotificationServices.RegisterForNotifications(UnityEngine.iOS.NotificationType.Alert | UnityEngine.iOS.NotificationType.Badge | UnityEngine.iOS.NotificationType.Sound, true);
#endif

        while (true)
        {
            byte[] token = null;
            string error = null;

#if UNITY_4
            token = NotificationServices.deviceToken;
            error = NotificationServices.registrationError;
#else
            token = UnityEngine.iOS.NotificationServices.deviceToken;
            error = UnityEngine.iOS.NotificationServices.registrationError;
#endif

            if (token != null)
            {
                FuseLog("Device token registered!");
                Native_RegisterPushToken(token, token.Length);
                break;
            }
            else if (error != null)
            {
                FuseLog("Failed to register for push notification device token with error: " + error);
                break;
            }
            yield return(new WaitForEndOfFrame());
        }
        yield break;
    }
    public void RegisterRemoteNotification()
    {
#if ENABLE_NOTIFICATION_LOG
        Debug.Log("[SysNotification] RegisterRemoteNotification");
#endif

#if UNITY_IPHONE
        // Register remote notification
        remoteNotificationRegistered = NotificationServices.deviceToken != null;
        if (remoteNotificationRegistered == false)
        {
            waitingForRemoteNotificationRegisterResult = true;
            NotificationServices.RegisterForRemoteNotificationTypes(
                RemoteNotificationType.Alert |
                RemoteNotificationType.Badge |
                RemoteNotificationType.Sound);
        }
        else
        {
            // Send notification token
            RequestMgr.Inst.Request(new SendAPNTokenRequest(NotificationServices.deviceToken));
        }
#endif
    }
 void OnRegistRemoteNotification()
 {
     NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
 }
Exemple #24
0
 public static void registerForPushNotification()
 {
     NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
 }
Exemple #25
0
    public override void Start()
    {
        Ag.LogIntenseWord(" Test.cs :: Start ");
        myGUI = new AmUI();
        myGUI.SetColumns(3, 18);
        ndGUI.SetColumns(2, 18);

        mTimeLooseAtStartPoint = 0.5f;
        base.Start();
        // Test ID Setting ....    WAS, Node     related ......    etc...
        Ag.mySelf = myUser = new AmUser();

        // Kakao Login case
        myUser.WAS.KkoID = "88214690633939999"; //"00000690633939993";//(CAMERA)  // "88214690633939999";  // <FakeKKO>  88299368562514961 <Legend Card>

//        Ag.mGuest = true;
//        myUser.DeviceID = "MOONTEST0000";


        myUser.WAS.TeamName = "TeamName22"; // 01604eb9f3657ae65bb9d8382b36d4c7 <Rolco DID>  //  "90973535271650928";//(CAMERA)
        myUser.WAS.KkoNick  = "Nick2424";
        myUser.WAS.Country  = 11;

        user2 = new AmUser();

        user2.DeviceID = user2.DeviceID + "Alt";

        user2.WAS.KkoID    = "91278098233517152"; //"90060594732486160"; //"88894476708738001";//"APPS_TEST_ID_0002";  90060594732486160  88306087115705857  90060594732486160 <KimDR>
        user2.WAS.TeamName = "Teamamama";         // 88214690633939121<Rolco>  91278098233517152 <Moon iPAD>  88712330645978192 <Moon> 88159078716546208 <Cho>
        user2.WAS.KkoNick  = "Nickkkkk";
        user2.WAS.Country  = 22;

        Ag.LogString("//  _////////////////////////////////////////////////_    _____  Test  _____   Test Started   _____");



        Ag.LogString("   abc_34 >>> " + "abc_34".GetContinuousInteger());
        Ag.LogString("   Pro_5 >>> " + "Pro_5".GetContinuousInteger());
        Ag.LogString("   empty >>> " + "".GetContinuousInteger());

        MtCompact aCom = new MtCompact(60);

        aCom.AddNum(10);
        aCom.AddNum(5);
        aCom.AddNum(8);
        aCom.AddNum(9);
        aCom.AddNum(31);

        aCom.AddNum(29);
        aCom.AddNum(48);
        aCom.AddNum(59);
        aCom.AddNum(9);
        aCom.AddNum(59);

        for (int k = 0; k < 10; k++)
        {
            Ag.LogString("  nth >> " + k + "    val >> " + aCom.GetNth(k));
        }

        aCom.ParseSelf();


        Ag.LogString(" time span check " + DateTime.Now + " is now " + (DateTime.Now - TimeSpan.FromHours(24)));


        #if UNITY_IPHONE
        AgStt.mIAP.TheUser = myUser;

        NotificationServices.RegisterForRemoteNotificationTypes(RemoteNotificationType.Alert | RemoteNotificationType.Badge | RemoteNotificationType.Sound);
//        Ag.LogIntenseWord ("NotificationServices.RegisterForRemoteNotificationTypes  ");


        //        Ag.LogString ("  string Null Check " + string.IsNullOrEmpty (null));   // IsNullOrEmpty  string ...
        //        Ag.LogString ("  string Null Check " + string.IsNullOrEmpty (""));  true
        //        Ag.LogString ("  string Null Check " + string.IsNullOrEmpty (" ")); false

        Ag.LogString("//  _////////////////////////////////////////////////_    _____  Test  _____   Time & Date   _____");
        DateTime dtNow = DateTime.Now;
        Ag.LogString(" theNow.ToLongTimeString () " + dtNow.ToLongTimeString());
        Ag.LogString(" 1398369347000 theNow.ToFileTime () " + dtNow.ToFileTime());
        Ag.LogString(" theNow.ToFileTimeUtc () " + dtNow.ToFileTimeUtc());

        long lgNow = dtNow.ToFileTimeUtc();
        Ag.LogString(" Recover >>> " + DateTime.FromFileTimeUtc(lgNow).ToString());


        (" dtNow   " + dtNow.ToString()).HtLog();
        dtNow = dtNow.AddSeconds(1234567);
        (" dtNow   " + dtNow.ToString()).HtLog();
        (" 10,000 sec :: " + UtTimestamp.ToDateTime(100000).ToString()).HtLog();
        int iNow = UtTimestamp.ToTimestamp(DateTime.Now);
        (" UtTimestamp.ToTimestamp  : Now  ==> " + iNow).HtLog();
        (" Back to Not :: " + UtTimestamp.ToDateTime(iNow).ToString()).HtLog();

        DateTime after10min = UtTimestamp.ToDateTime(iNow + 600);

        Ag.LogString(" After 10 Min ::  " + after10min.Minute.ToString() + " : " + after10min.Second.ToString());


        //  _////////////////////////////////////////////////_    _____  Test  _____    Score   _____
        GameLogic();

        //  _////////////////////////////////////////////////_    _____  Test  _____    Encript   _____
        // TestEncript();

        //  _////////////////////////////////////////////////_    _____  Test  _____    Deck System   _____
        Ag.LogString("//  _////////////////////////////////////////////////_    _____  Test  _____    Deck System   Case 1 >> _____");

        AmGameLogic aGLogic = new AmGameLogic("", "");
        Ag.LogString("  Score " + 5000 + "  1 * 7% " + aGLogic.ApplyDeckIncrease(5000f, new int[] { 0, 1, 0 }, 1));
        Ag.LogString("  Score " + 5000 + "  2 * 7% " + aGLogic.ApplyDeckIncrease(5000f, new int[] { 1, 1, 0 }, 2));
        Ag.LogString("  Score " + 5000 + "  3 * 7% " + aGLogic.ApplyDeckIncrease(5000f, new int[] { 1, 1, 1 }, 3));

        Ag.LogString("  Score " + 5000 + "  1 * 10% " + aGLogic.ApplyDeckLosingScore(5000f, new int[] { 2, 7, 3 }, 2));
        Ag.LogString("  Score " + 5000 + "  2 * 10% " + aGLogic.ApplyDeckLosingScore(5000f, new int[] { 7, 7, 3 }, 2));
        Ag.LogString("  Score " + 5000 + "  3 * 10% " + aGLogic.ApplyDeckLosingScore(5000f, new int[] { 7, 7, 7 }, 2));



        //  _////////////////////////////////////////////////_    _____  Test  _____    Meta Programming   _____
        Ag.LogDouble("  Meta Programming >>>  " + char.Parse("3") + " " + char.Parse("4") + char.Parse("K"));
//        char ch3 = char.Parse ("3"), ch4 = char.Parse ("4");
//        (ch3 > ch4).ToString ().HtLog ();
//        (ch3 < ch4).ToString ().HtLog ();
//        (" 0 : to Byte " + Convert.ToByte ("0").ToString () + " -> char -> byte : " + Convert.ToByte (char.Parse ("0"))).HtLog ();
//        (" 1 : to Byte " + Convert.ToByte ("1").ToString () + " -> char -> byte : " + Convert.ToByte (char.Parse ("1"))).HtLog ();
//        (" 9 : to Byte " + Convert.ToByte ("9").ToString () + " -> char -> byte : " + Convert.ToByte (char.Parse ("9"))).HtLog ();
//        ("00345 parse :: " + int.Parse ("000345")).HtLog ();
//
//        ("GetContinuousInteger  Test >>   abcde345dkdk  ::  " + "abcde345dkdk".GetContinuousInteger ()).HtLog ();
//        ("GetContinuousInteger  Test >>   abcde00345dkdk34399  ::  " + "abcde00345dkdk34399".GetContinuousInteger ()).HtLog ();
//        ("GetContinuousInteger  Test >>   abcde002345dkdk34399  ::  " + "abcde002345dkdk34399".GetContinuousInteger ()).HtLog ();
//        ("GetContinuousInteger  Test >>   abcdewlwlwl  ::  " + "abcdewlwlwl".GetContinuousInteger ()).HtLog ();

        //  _////////////////////////////////////////////////_    _____  Test  _____    Game Win / Lose   _____
//        bool goal = AgUtilGame.DidKickerWinThisTurn(5, 3, 0, 0);
//        Ag.LogString ("   goal  >>>   " + goal);
//        goal = AgUtilGame.DidKickerWinThisTurn(5, 3, 1, 2);
//        Ag.LogString ("   goal  >>>   " + goal);

        //  _////////////////////////////////////////////////_    _____  Test  _____    ??   _____
//
//
//        string str = "1~`aA+_';\"지금";
//
//        Encoding unicode = Encoding.Unicode;
//        Encoding utf8 = Encoding.UTF8;
//
//        byte[] unicodeBytes = unicode.GetBytes(str);
//
//        byte[] utf8Bytes = Encoding.Convert( unicode,
//            utf8,
//            unicodeBytes );
//
//        //Console.WriteLine( "UTF Bytes:" );
//        StringBuilder sb = new StringBuilder();
//        foreach( byte b in utf8Bytes ) {
//            sb.Append( b ).Append(" : ");
//        }
//
//
//        Ag.LogIntenseWord ("   UTF 16 :: " + sb.ToString());
//
        Ag.LogString("  Jail Break Result >>>>>  Fb.JailBreakIOS : " + Fb.JailBreakIOS);
        #endif
        timerObj.WaitTimeFor(0, 0, 8);


        #if UNITY_EDITOR
        " #if UNITY_EDITOR ".HtLog();
        #endif

        //  _////////////////////////////////////////////////_    _____  Test  _____    T e s t   _____
        // # 참고... String 이 너무 짧아 crash 되는 소스. iOS try 문에서 잡아줌. ...
        //NotificationServices.enabledRemoteNotificationTypes.ToString ().HtLog ();



//        Ag.LogStartWithStr (3, "  Card  WAS   SetDirection ()  ");
//        AmCard tCrd = new AmCard ();
//        tCrd.WAS.grade = "S";
//        tCrd.WAS.isKicker = true;
//        tCrd.WAS.SetDirection ();
//        tCrd.WAS.ShowMySelf ();

        //Ag.SingleTry = 1;

        string hanTest = WWW.UnEscapeURL("%EC%9E%AC%EA%B2%BD%EA%B8%B0%EC%88%98%EB%9D%BD%20%EC%8B%9C%EA%B0%84%EC%B4%88%EA%B3%BC");

        hanTest = "%E0%B8%B8%32";
        if (hanTest == "%E0%B8%B8")
        {
            Ag.LogIntenseWord("  if (hanTest  ");
        }

        WWW.EscapeURL("ุ").HtLog();
        hanTest = WWW.UnEscapeURL(null);

        string errhanTest = WWW.UnEscapeURL(WWW.EscapeURL("종국이 총각 김치"));   // Error

        Ag.LogStartWithStr(3, "  0.ToFixedWidth (jarisu++).HtLog();" + hanTest + errhanTest);

        int jarisu = 0;
        0.ToFixedWidth (jarisu++).HtLog();

        //  AgUtil.ToJson  int 어레이를 Json 으로.
        ("  AgUtil.ToJson  Test ::   " + AgUtil.IntArrToJson("AgUtil.ToJson", new int[] {
            3, 4, 5
        })).HtLog();
        ("  AgUtil.ToJson  Empty ::   " + AgUtil.IntArrToJson("AgUtil.ToJson  >> ", new int[] { })).HtLog();
        Ag.LogNewLine(1);

        // Null Parsing
        string   strNullInclude = " {\"WasKey\":null}";
        JSONNode aNde           = JSON.Parse(strNullInclude);
        string   strNullParsed  = aNde ["WasKey"];
        Ag.LogString("  if (aNde['WasKey'] == null)   is true   " + aNde ["WasKey"] + aNde ["WasKey"].ToString());
        if (AgUtil.IsNullJson(aNde ["WasKey"]))
        {
            Ag.LogString("  OK   print this line ......     AgUtil.IsNullJson    Success  ...... ");
        }
        ("  this is null parse to Int test >>>  " + aNde ["Nooo"].AsInt).HtLog();
        ("  this is null parsing  >>>>  " + aNde ["WasKey"]).HtLog();                                            // null
        ("  this is null parsed String  >>>>  " + strNullParsed + "  Length : " + strNullParsed.Length).HtLog(); // null4 .. ??


        // Simple JSON Test
        ATestClass aObb  = new ATestClass();
        string     jsStr = JsonMapper.ToJson(aObb); // LitJson 으로 인코딩.. int 355
        ("  object ==> JsonMapper.ToJson  ==>   jsStr :: >>   " + jsStr).HtLog();
        JSONNode jsLitSim = JSON.Parse(jsStr);
        ("       Parsed  as  >>>>      " + jsLitSim.ToString()).HtLog();
        ("  If no info JSON Parsing ::  This will Crash ???   " + jsLitSim ["Empty"].AsBool.ToString() + " <<  AsBool == false ...   ").HtLog();
        ("  If no info JSON Parsing ::  This will Crash ???   " + jsLitSim ["Empty"].AsInt.ToString() + " <<  AsInt == false ...   ").HtLog();
        ("        Just[\"sB\"] :  " + jsLitSim ["sB"] + "        Add  ToString() : " + jsLitSim ["sB"].ToString()).HtLog();
        //public string nameOfYourVariable = MemberInfoGetting.GetMemberName(() => MyVariable);
        Ag.LogNewLine(1);

        // Print Name of variables ....   Reflection  ???
        int    nameOfInt          = 35;
        string nameOfYourVariable = AgUtil.GetN(() => nameOfInt);
        ("   nameOfYourVariable  >>  Test ::  Key : " + nameOfYourVariable + "  Value : " + nameOfInt).HtLog();
        Ag.LogNewLine(1);

        // Null test ...
        ("  {  }   Test IsJsonNull  >> All True ?? >>  " + " { } ".IsJsonNull() + " {} ".IsJsonNull() + "null".IsJsonNull() + "{ }".IsJsonNull()).HtLog();
        ("  {  }   Test IsJsonNull  >> All True ?? >>  " + " { _ } ".IsJsonNull() + "  }{  ".IsJsonNull()).HtLog();



        Ag.LogIntense(5, false);
    }