Exemple #1
0
        void OnEnable()
        {
            SecurePlayerPrefs.SetInt(GameTime.LUDO_GAME, 0);
            SecurePlayerPrefs.SetInt(GameTime.LUDO_GOLD, 0);
            SecurePlayerPrefs.SetInt(GameTime.LUDO_PRIME_GAME, 0);

            WWWForm form = new WWWForm();

            form.AddField("TAG", "TIME");
            WebManager.Instance.StartRequest(form, ServerRequest, "TIME");
        }
Exemple #2
0
 public void NotificationAction()
 {
     if (notificationOn == 1)
     {
         notificationBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/unselected_box");
         SecurePlayerPrefs.SetInt(GameTags.NOTIFICATION_ON, 0);
         notificationOn = 0;
     }
     else
     {
         notificationBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/selected_box");
         SecurePlayerPrefs.SetInt(GameTags.NOTIFICATION_ON, 1);
         notificationOn = 1;
     }
 }
Exemple #3
0
 public void SoundAction()
 {
     if (soundOn == 1)
     {
         soundBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/unselected_box");
         SecurePlayerPrefs.SetInt(GameTags.SOUND_ON, 0);
         soundOn = 0;
     }
     else
     {
         soundBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/selected_box");
         SecurePlayerPrefs.SetInt(GameTags.SOUND_ON, 1);
         soundOn = 1;
     }
 }
Exemple #4
0
 public void MusicAction()
 {
     if (musicOn == 1)
     {
         musicBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/unselected_box");
         SecurePlayerPrefs.SetInt(GameTags.MUSIC_ON, 0);
         musicOn = 0;
     }
     else
     {
         musicBtn.GetComponent <Image>().sprite = Resources.Load <Sprite>("images/new/selected_box");
         SecurePlayerPrefs.SetInt(GameTags.MUSIC_ON, 1);
         musicOn = 1;
     }
 }
Exemple #5
0
        void Start()
        {
            CreatePrivateTablePanel.SetActive(false);
            QuitApplication.SetActive(false);
            SettingPanel.SetActive(false);
            ErrorMsgPanel.SetActive(false);
            ClosePanel.SetActive(false);

            GetUserID();

            SecurePlayerPrefs.SetString(GameTags.FACEBOOK_FRIEND, "");
            SecurePlayerPrefs.SetString(GameTags.CREATE_TABLE, "");
            SecurePlayerPrefs.SetString(GameTags.CHALLENGE_FRIEND, "");
            SecurePlayerPrefs.SetString(GameTags.PRIVATE_TABLE_TYPE, "");
            SecurePlayerPrefs.SetString(GameTags.OFFLINE, "");
            SecurePlayerPrefs.SetString(GameTags.CHALLENGE_FRIEND, "");
            SecurePlayerPrefs.SetString(GetPlayerDetailsTags.ROOM_ID, "");
            GameController.Message  = "";
            GameController.Message1 = "";

            SecurePlayerPrefs.SetInt(GameTime.LUDO_GAME, GameTime.ON);
            SecurePlayerPrefs.SetInt(GameTime.LUDO_GOLD, GameTime.ON);
        }
Exemple #6
0
        private void ServerRequest(string response)
        {
            Debug.Log("response" + response);
            try
            {
                JSONNode node = JSON.Parse(response);

                if (node != null)
                {
                    string result = node["status"];

                    if (result.Equals("OK"))
                    {
                        try
                        {
                            JSONNode data1 = node["data"];
                            SecurePlayerPrefs.SetInt(GameTime.LUDO_GAME, int.Parse("" + data1["LUDO_GAME"]));
                            SecurePlayerPrefs.SetInt(GameTime.LUDO_GOLD, int.Parse("" + data1["LUDO_GOLD"]));
                            SecurePlayerPrefs.SetInt(GameTime.LUDO_PRIME_GAME, int.Parse("" + data1["LUDO_PRIME_GAME"]));


                            SecurePlayerPrefs.SetString(GameTime.LUDO_TEXT, "" + data1["LUDO_TEXT"]);
                            SecurePlayerPrefs.SetString(GameTime.LUDO_GOLD_TEXT, "" + data1["LUDO_GOLD_TEXT"]);
                            SecurePlayerPrefs.SetString(GameTime.LUDO_PRIME_TEXT, "" + data1["LUDO_PRIME_TEXT"]);
                        }
                        catch
                        {
                            Debug.Log("Message");
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                Debug.Log(ex.Message);
            }
        }