コード例 #1
0
    /// <summary>
    /// 初始化
    /// 创建对象,并附加脚本
    /// </summary>
    void Init()
    {
        GameObject go = GameObject.Find("__SceneManager");

        if (go == null)
        {
            scenenManagerObject = new GameObject("__SceneManager");
            GameObject.DontDestroyOnLoad(scenenManagerObject);
            sceneManagerHelper = (SceneManagerHelper)scenenManagerObject.AddComponent(typeof(SceneManagerHelper));
        }
        else
        {
            if (go.GetComponent <SceneManagerHelper>() != null)
            {
                GameObject.Destroy(go.GetComponent <SceneManagerHelper>());
            }
            else
            {
                go.AddComponent <SceneManagerHelper>();
            }
            sceneManagerHelper = go.GetComponent <SceneManagerHelper>();
        }

        sceneManagerHelper._SceneManager = this;
    }
コード例 #2
0
    private IEnumerator kurangEnergy()
    {
        string  url  = Link.url + "energy";
        WWWForm form = new WWWForm();

        form.AddField(Link.ID, PlayerPrefs.GetString(Link.ID));
        WWW www = new WWW(url, form);

        yield return(www);

        if (www.error == null)
        {
            var jsonString = JSON.Parse(www.text);
            Debug.Log(www.text);
            PlayerPrefs.SetString(Link.FOR_CONVERTING, jsonString["code"]);
            if (PlayerPrefs.GetString(Link.FOR_CONVERTING) == "0")
            {
                SceneManagerHelper.LoadScene(Link.PilihCharacter);
            }
        }
        else
        {
            Debug.Log("GAGAL");
        }
    }
コード例 #3
0
        private void SetupHashAndData(Texture2D texture)
        {
            if (_key == null)
            {
                if (Settings.TextureHashGenerationStrategy == TextureHashGenerationStrategy.FromImageData)
                {
                    var result = TextureHelper.GetData(texture);

                    _originalData = result.Data;
                    _nonReadable  = result.NonReadable;
                    _key          = HashHelper.Compute(_originalData);
                }
                else if (Settings.TextureHashGenerationStrategy == TextureHashGenerationStrategy.FromImageName)
                {
                    var name = texture.name; // name may be duplicate, WILL be duplicate!
                    if (string.IsNullOrEmpty(name))
                    {
                        return;
                    }

                    var result = SetupKeyForNameWithFallback(name, texture);

                    if (Settings.EnableTextureToggling || Settings.DetectDuplicateTextureNames)
                    {
                        if (result == null)
                        {
                            result = TextureHelper.GetData(texture);
                        }

                        _originalData = result.Data;
                        _nonReadable  = result.NonReadable;
                    }
                }
                else if (Settings.TextureHashGenerationStrategy == TextureHashGenerationStrategy.FromImageNameAndScene)
                {
                    var name = texture.name; // name may be duplicate, WILL be duplicate!
                    if (string.IsNullOrEmpty(name))
                    {
                        return;
                    }

                    name += "|" + SceneManagerHelper.GetActiveSceneId();

                    var result = SetupKeyForNameWithFallback(name, texture);

                    if (Settings.EnableTextureToggling || Settings.DetectDuplicateTextureNames)
                    {
                        if (result == null)
                        {
                            result = TextureHelper.GetData(texture);
                        }

                        _originalData = result.Data;
                        _nonReadable  = result.NonReadable;
                    }
                }
            }
        }
コード例 #4
0
 // Token: 0x0600BB45 RID: 47941 RVA: 0x004425A0 File Offset: 0x004407A0
 public virtual void FABMDEHEDNO()
 {
     if (this.IDBCIKHLGKL && this.AutoConnect && !PhotonNetwork.connected)
     {
         Debug.Log("StartButton");
         this.IDBCIKHLGKL = false;
         PhotonNetwork.ConnectUsingSettings(this.Version + "_TimeX" + SceneManagerHelper.HNACANCGPPP());
     }
 }
コード例 #5
0
 public void OnBack()
 {
     if (savestates.GetComponent <Button>().interactable == true)
     {
         saving.SetActive(true);
     }
     else
     {
         SceneManagerHelper.LoadScene("Storage");
     }
 }
コード例 #6
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #7
0
ファイル: SceneManagerHelper.cs プロジェクト: Darrus/GGJ_2018
 private void Awake()
 {
     if (!m_Instance)
     {
         m_Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #8
0
    public void RequestPermission()
    {
        if (UniAndroidPermission.IsPermitted(AndroidPermission.ACCESS_FINE_LOCATION))
        {
            // text.text = "WRITE_EXTERNAL_STORAGE is already permitted!!";
            if (UniAndroidPermission.IsPermitted(AndroidPermission.CAMERA))
            {
                SceneManagerHelper.LoadScene("berburuhantu");

                // text.text = "CAMERA is already permitted!!";
                return;
            }
            UniAndroidPermission.RequestPermission(AndroidPermission.CAMERA, OnAllow2, OnDeny2, OnDenyAndNeverAskAgain2);
            return;
        }

        UniAndroidPermission.RequestPermission(AndroidPermission.ACCESS_FINE_LOCATION, OnAllow, OnDeny, OnDenyAndNeverAskAgain);
    }
コード例 #9
0
    // Update is called once per frame
    void Update()
    {
        if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "FALSE")
        {
            if (Input.GetKey(KeyCode.Escape) && escape == false)
            {
                escape = true;
                if (Application.loadedLevelName == "Arena" && escape == true)
                {
                    SceneManagerHelper.LoadScene("Map");

                    escape = false;
                }
                else if (Application.loadedLevelName == "Searching" && escape == true)
                {
                    SceneManagerHelper.LoadScene("Arena");
                    escape = false;
                }
                else if (Application.loadedLevelName == "Game" && escape == true && PlayerPrefs.GetString(Link.JENIS) == "SINGLE")
                {
                    SceneManagerHelper.LoadScene("Map");
                    escape = false;
                }
                else if (Application.loadedLevelName == "Game" && escape == true && PlayerPrefs.GetString(Link.JENIS) == "MULTIPLE")
                {
                    SceneManagerHelper.LoadScene("Arena");
                    escape = false;
                }
                else
                {
                    if (GameObject.Find("LoadingScreen") != null)
                    {
                        GameObject.Find("LoadingScreen").GetComponent <SceneLoader> ().LoadingScreeen();
                    }
                    else
                    {
                        SceneManagerHelper.LoadScene("Home");
                        escape = false;
                    }
                }
            }
        }
    }
コード例 #10
0
    public IEnumerator  AnimasiInformasiServer(string info)
    {
        isInfromasiServerPlay = true;
        informasiServer.SetActive(true);
        informasiServer.GetComponentInChildren <Text> ().text = info;
        informasiServer.GetComponent <Animator> ().Play("informasiServer");
        yield return(new WaitForSeconds(2));

        informasiServer.SetActive(false);
        isInfromasiServerPlay = false;
        informasiServer.GetComponentInChildren <Text> ().text = "";
        StopCoroutine(AnimasiInformasiServer(""));


        if (info == "Register Complete")
        {
            SceneManagerHelper.LoadScene("Home");
        }
    }
コード例 #11
0
    IEnumerator onCoroutine()
    {
        while (true)
        {
            StartCoroutine(findMatch2());
            if (done)
            {
                time.text = (int.Parse(time.text) - 1).ToString();
                if (int.Parse(time.text) == 0 || int.Parse(time.text) <= 0 || int.Parse(time.text) < 0)
                {
                    PlayerPrefs.SetInt("GoRestart", 1);
                    SceneManagerHelper.LoadScene("Home");
                }
            }



            yield return(new WaitForSeconds(1f));
        }
    }
コード例 #12
0
ファイル: Home.cs プロジェクト: MonkeyDKid/XKuntilanakXPocong
    private IEnumerator LoginOut()
    {
        string  url  = Link.url + "logout";
        WWWForm form = new WWWForm();

        form.AddField(Link.DEVICE_ID, PlayerPrefs.GetString(Link.DEVICE_ID));
        form.AddField(Link.EMAIL, PlayerPrefs.GetString(Link.EMAIL));
        form.AddField(Link.PASSWORD, PlayerPrefs.GetString(Link.PASSWORD));

        WWW www = new WWW(url, form);

        yield return(www);

        if (www.error == null)
        {
            var jsonString = JSON.Parse(www.text);
            PlayerPrefs.DeleteAll();
            //PlayerPrefs.DeleteKey(Link.STATUS_LOGIN);
            //PlayerPrefs.DeleteKey("SummonTutor");
            SceneManagerHelper.LoadScene(Link.Register);
            //PlayerPrefs.DeleteKey("tutorhitung");
            //PlayerPrefs.DeleteKey(Link.LOGIN_BY);
        }
    }
コード例 #13
0
    public void OnClick()
    {
        PlayerPrefs.SetString(Link.LOKASI, "hospital");
        PlayerPrefs.SetString(Link.USER_1, NamaText.text.ToString());
        PlayerPrefs.SetString(Link.USER_2, PlayerPrefs.GetString(Link.FULL_NAME));

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_FILE, file1);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_FILE, file2);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_FILE, file3);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_ID, defense_id1);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_ID, defense_id2);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_ID, defense_id3);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_GRADE, defense_grade1);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_GRADE, defense_grade2);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_GRADE, defense_grade3);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_LEVEL, defense_level1);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_LEVEL, defense_level2);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_LEVEL, defense_level3);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_ATTACK, defense1_attack);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_ATTACK, defense2_attack);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_ATTACK, defense3_attack);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_DEFENSE, defense1_defense);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_DEFENSE, defense2_defense);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_DEFENSE, defense3_defense);

        PlayerPrefs.SetString(Link.POS_1_CHAR_1_HP, defense1_hp);
        PlayerPrefs.SetString(Link.POS_1_CHAR_2_HP, defense2_hp);
        PlayerPrefs.SetString(Link.POS_1_CHAR_3_HP, defense3_hp);

        SceneManagerHelper.LoadScene("PilihCharacterOB");
    }
コード例 #14
0
    // The coroutine runs on its own at the same time as Update() and takes an integer indicating which scene to load.
    IEnumerator LoadNewScene()
    {
        // This line waits for 3 seconds before executing the next line in the coroutine.
        // This line is only necessary for this demo. The scenes are so simple that they load too fast to read the "Loading..." text.
        yield return(new WaitForSeconds(2));

        // Start an asynchronous operation to load the scene that was passed to the LoadNewScene coroutine.
        if (Application.loadedLevelName == "Opening")
        {
            if (PlayerPrefs.GetString(Link.STATUS_LOGIN) == "true")
            {
                if (PlayerPrefs.GetString(Link.LOGIN_BY) == "EMAIL")
                {
                    StartCoroutine(loginIEnumerator(PlayerPrefs.GetString(Link.EMAIL), PlayerPrefs.GetString(Link.PASSWORD), "EMAIL"));
                }
                else if (PlayerPrefs.GetString(Link.LOGIN_BY) == "FB")
                {
                    StartCoroutine(loginIEnumerator(PlayerPrefs.GetString(Link.EMAIL), PlayerPrefs.GetString(Link.PASSWORD), "FB"));
                }
                else if (PlayerPrefs.GetString(Link.LOGIN_BY) == "Google")
                {
                    StartCoroutine(loginIEnumerator(PlayerPrefs.GetString(Link.EMAIL), PlayerPrefs.GetString(Link.PASSWORD), "Google"));
                }
                yield return(new WaitForSeconds(2));
            }
            else
            {
                SceneManagerHelper.LoadMusic(scene);
                async = Application.LoadLevelAsync(scene);
            }
        }
        else
        {
            SceneManagerHelper.LoadMusic(scene);
            async = Application.LoadLevelAsync(scene);
        }
        //yield return async;

        // While the asynchronous operation to load the new scene is not yet complete, continue waiting until it's done.
        if (async != null)
        {
            async.allowSceneActivation = false;
            while (async.progress < 0.9f)
            {
                // Report progress etc.
                GambarLoad.gameObject.transform.FindChild("Image").GetComponent <Image> ().fillAmount = async.progress;
                progress = "Progress: " + async.progress.ToString();
                yield return(null);
            }
            // Show the UI button to actually start loaded level
            doneLoading = true;
            while (!allowLoading)
            {
                // Wait for allow button to be pushed.

                progress = "Progress: " + async.progress.ToString();
                GambarLoad.gameObject.transform.FindChild("Image").GetComponent <Image> ().fillAmount = 1;
                yield return(null);
            }
            // Allow the activation of the scene again.
            async.allowSceneActivation = true;
        }
    }
コード例 #15
0
 public void OnCancel()
 {
     SceneManagerHelper.LoadScene("Arena");
 }
コード例 #16
0
 public void OnBack()
 {
     SceneManagerHelper.LoadScene("Home");
 }
コード例 #17
0
 public void OnEquipmentClick()
 {
     PlayerPrefs.SetString(Link.FOR_CONVERTING, hantuPlayerId);
     PlayerPrefs.SetString(Link.FOR_CONVERTING_2, file);
     SceneManagerHelper.LoadScene("Equipment");
 }
コード例 #18
0
ファイル: Home.cs プロジェクト: MonkeyDKid/XKuntilanakXPocong
 public void OnHuntingClick()
 {
     SceneManagerHelper.LoadScene("berburuhantu");
 }
コード例 #19
0
 public void EXPDISTRIBUTION()
 {
     SceneManagerHelper.LoadScene("EXPDis");
 }
コード例 #20
0
    void Start()
    {
        PlayerPrefs.SetString("SummonStats", "Idling");
        //PlayerPrefs.SetString ("PLAY_TUTORIAL", "TRUE");
        Debug.Log(PlayerPrefs.GetString("PLAY_TUTORIAL"));
        tutorHitung = PlayerPrefs.GetInt("tutorhitung");
        if (PlayerPrefs.GetInt("Catched") == 0 || !PlayerPrefs.HasKey("Catched"))
        {
            Summonsd.SetActive(true);


            if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "TRUE")
            {
                if (PlayerPrefs.HasKey("tutorhitung"))
                {
                    tutorHitung = PlayerPrefs.GetInt("tutorhitung");
                    if (tutorHitung > 3)
                    {
                        tutorHitung = 3;
                        PlayerPrefs.SetString("SummonTutor", "UDAH");
                        SceneManagerHelper.StopTutorial();
                        //next.SetActive(true);
                        firstTimerSummonScript.position = 3;
                    }
                }
                SceneManagerHelper.LoadTutorial("Summon");
                //firstTimerSummonScript.gameObject.SetActive (true);
            }
            else
            {
                firstTimerSummonScript.gameObject.SetActive(false);
            }

            StartCoroutine(updateData());
            OnClickCommon();
            Gold.text      = PlayerPrefs.GetString(Link.GOLD);
            Crystal.text   = PlayerPrefs.GetString("Crystal");
            Common.text    = PlayerPrefs.GetString(Link.COMMONGem);
            Rare.text      = PlayerPrefs.GetString(Link.RAREGem);
            Legendary.text = PlayerPrefs.GetString(Link.LEGENDARYGem);
            //SoulStone.text = PlayerPrefs.GetString (Link.SOUL_STONE);

            icon.sprite = CommonIcon;
            jenis       = "COMMON";
            header.text = "SUMMON " + jenis;

            Debug.Log(PlayerPrefs.GetString(Link.GOLD) + "/" + PlayerPrefs.GetString(Link.COMMONGem));


            if (int.Parse(PlayerPrefs.GetString(Link.GOLD)) >= 20 && int.Parse(PlayerPrefs.GetString(Link.COMMONGem)) >= 1)
            {
                statusAktif.SetActive(false);
            }
            else
            {
                statusAktif.SetActive(true);
            }
        }
        else
        {
            OKCatch.onClick.AddListener(Unload);
            if (PlayerPrefs.GetInt("Rarity") == 0)
            {
                jenis = "COMMON";
            }
            else if (PlayerPrefs.GetInt("Rarity") == 1)
            {
                jenis = "RARE";
            }
            else
            {
                jenis = "LEGENDARY";
            }

            OnClickSummoned();
        }
    }
コード例 #21
0
    IEnumerator tunggustage(string stage, float time)
    {
        yield return(new WaitForSeconds(time));

        SceneManagerHelper.LoadScene(stage);
    }
コード例 #22
0
 // Token: 0x0600BB48 RID: 47944 RVA: 0x00442628 File Offset: 0x00440828
 public virtual void OEENOOGEEHD()
 {
     if (this.IDBCIKHLGKL && this.AutoConnect && !PhotonNetwork.connected)
     {
         Debug.Log("Curve texture");
         this.IDBCIKHLGKL = true;
         PhotonNetwork.ConnectUsingSettings(this.Version + "CameraFilterPack/TV_Old" + SceneManagerHelper.NFKGOFFDNEH());
     }
 }
コード例 #23
0
 public void OnBack2()
 {
     SceneManagerHelper.LoadScene("Storage");
 }
コード例 #24
0
    private IEnumerator findMatch2()
    {
        string  url  = Link.url + "cek_match";
        WWWForm form = new WWWForm();

        form.AddField("id_device", android_id);
        form.AddField("room_name", PlayerPrefs.GetString("RoomName"));
        WWW www = new WWW(url, form);

        yield return(www);

        if (www.error == null)
        {
            done = true;
            var jsonString = JSON.Parse(www.text);

            PlayerPrefs.SetInt("value", int.Parse(jsonString ["code"][0]["value"]));

            if (PlayerPrefs.GetInt("value") == 2)
            {
                Debug.Log("SDH 2");

                PlayerPrefs.SetString("id_device_make", jsonString ["code"][0]["id_device_make"]);
                PlayerPrefs.SetString("TheStatus", jsonString ["code"][0]["status"]);

                if (PlayerPrefs.GetString("id_device_make") == android_id)
                {
                    PlayerPrefs.SetInt("pos", 1);

                    if (PlayerPrefs.GetString("TheStatus") == "1")
                    {
                        if (stoped == false)
                        {
                            stoped = true;
                            StartCoroutine(GotoUpdate());
                        }
                    }
                    else
                    {
                        PlayerPrefs.SetString("id_device", android_id);
                        StartCoroutine(kurangEnergy());
                        //	Application.LoadLevel ("Pilih Character");
                    }
                }
                else
                {
                    PlayerPrefs.SetInt("pos", 0);

                    if (PlayerPrefs.GetString("TheStatus") == "1")
                    {
                    }
                    else
                    {
                        PlayerPrefs.SetString("id_device", android_id);
                        SceneManagerHelper.LoadScene("Pilih Character");
                    }
                }
            }
            else
            {
                Debug.Log("belum 2");
            }
        }
        else
        {
            Debug.Log("fail");
        }
    }
コード例 #25
0
    private IEnumerator DQItemList()
    {
        string  url  = Link.url + "DQuest";
        WWWForm form = new WWWForm();

        form.AddField("MY_ID", PlayerPrefs.GetString(Link.ID));
        //form.AddField ("SHOP_JENIS", "SPECIAL");
        WWW www = new WWW(url, form);

        yield return(www);

        if (www.error == null)
        {
            Debug.Log(www.text);
            var jsonString = JSON.Parse(www.text);
            //PlayerPrefs.SetString (Link.FOR_CONVERTING, jsonString["ID_SHOP_SPECIAL"]);
            if (int.Parse(jsonString["code"]) == 1)
            {
                for (int x = 0; x < int.Parse(jsonString["count"]); x++)
                {
                    int lol    = 0;
                    var number = int.TryParse(jsonString["data"][x]["Quest_Done"], out lol);

                    if (number)
                    {
                        if (lol == 1)
                        {
                            string String = jsonString["data"][x]["Type"];
                            if (String == "Summon")
                            {
                                PlayerPrefs.SetString("SummonMissionStats", "FALSE");
                            }
                            if (String == "SingleMode")
                            {
                                PlayerPrefs.SetString("SoloMissionStats", "FALSE");
                            }
                            if (String == "Catch")
                            {
                                PlayerPrefs.SetString("CatchMissionStats", "FALSE");
                            }
                        }
                        else
                        {
                            string String = jsonString["data"][x]["Type"];
                            if (String == "Summon")
                            {
                                PlayerPrefs.SetString("SummonMissionStats", "TRUE");
                                PlayerPrefs.SetString("SummonMissionQD", jsonString["data"][x]["ID"]);
                            }
                            if (String == "SingleMode")
                            {
                                PlayerPrefs.SetString("SoloMissionStats", "TRUE");
                                PlayerPrefs.SetString("SoloMissionQD", jsonString["data"][x]["ID"]);
                            }
                            if (String == "Catch")
                            {
                                PlayerPrefs.SetString("CatchMissionStats", "TRUE");
                                PlayerPrefs.SetString("CatchMissionQD", jsonString["data"][x]["ID"]);
                            }
                        }
                        //     Debug.Log(PlayerPrefs.GetString("SoloMissionQD"));
                    }
                    else
                    {
                    }
                }
            }
            else
            {
                Debug.Log("NoMission");
            }
            yield return(new WaitForSeconds(1f));

            Application.LoadLevel(Link.Home);
            SceneManagerHelper.LoadMusic("Home");
        }
        else
        {
            Debug.Log(www.text);
            Debug.Log("NoMission");
        }
    }
コード例 #26
0
 private void Start()
 {
     _instance = this;
     DontDestroyOnLoad(gameObject);
 }
コード例 #27
0
 void Awake()
 {
     instance = this;
 }
コード例 #28
0
 public void OnBack()
 {
     SceneManagerHelper.LoadScene(Link.Home);
 }
コード例 #29
0
    private IEnumerator loginIEnumerator(string email, string pass, string login_by)
    {
        string  url  = Link.url + "login";
        WWWForm form = new WWWForm();

        form.AddField(Link.DEVICE_ID, device_id);
        form.AddField(Link.EMAIL, email);
        form.AddField(Link.PASSWORD, pass);
        form.AddField("Version", version);

        WWW www = new WWW(url, form);

        yield return(www);

        if (www.error == null)
        {
            var jsonString = JSON.Parse(www.text);
            Debug.Log(jsonString);
            PlayerPrefs.SetInt("informasiServer", int.Parse(jsonString["code"]));

            switch (PlayerPrefs.GetInt("informasiServer"))
            {
            case 1:
                async = Application.LoadLevelAsync("Home");
                SceneManagerHelper.LoadMusic("Home");
                if (int.Parse(jsonString["data"]["tfinish"]) == 0)
                {
                    PlayerPrefs.SetString("PLAY_TUTORIAL", "TRUE");
                }
                else
                {
                    //PlayerPrefs.DeleteKey ("Tutorialman");
                    PlayerPrefs.SetString("PLAY_TUTORIAL", "FALSE");
                }

                PlayerPrefs.SetString(Link.ID, jsonString["data"]["id"]);
                PlayerPrefs.SetString(Link.LOGIN_BY, login_by);
                PlayerPrefs.SetString(Link.STATUS_LOGIN, "true");
                PlayerPrefs.SetString(Link.EMAIL, jsonString["data"]["email"]);
                PlayerPrefs.SetString(Link.USER_NAME, jsonString["data"]["user_name"]);
                PlayerPrefs.SetString(Link.FULL_NAME, jsonString["data"]["full_name"]);
                PlayerPrefs.SetString(Link.AP, jsonString["data"]["ap"]);
                PlayerPrefs.SetString(Link.AR, jsonString["data"]["ar"]);
                PlayerPrefs.SetString(Link.PASSWORD, pass);
                PlayerPrefs.SetString(Link.DEVICE_ID, device_id);
                PlayerPrefs.SetString(Link.Stage, jsonString["data"]["Stage"]);
                PlayerPrefs.SetString(Link.IBURU, jsonString["data"]["iklan_buru"]);
                PlayerPrefs.SetString(Link.IGOLD, jsonString["data"]["iklan_gold"]);
                PlayerPrefs.SetString(Link.IENERGY, jsonString["data"]["iklan_energy"]);
                //
                PlayerPrefs.SetString("BonusEnergy", jsonString["data"]["BonusEnergy"]);
                //
                var energy = int.Parse(jsonString["data"]["energy"]) + int.Parse(jsonString["data"]["BonusEnergy"]);
                PlayerPrefs.SetString("EnergyCombo", energy.ToString());
                PlayerPrefs.SetString("curexp", jsonString["data"]["xpp"]);
                PlayerPrefs.SetString("tarexp", jsonString["data"]["targetexplevel"]);
                PlayerPrefs.SetString(Link.ENERGY, jsonString["data"]["energy"]);
                PlayerPrefs.SetString("MaxE", jsonString["data"]["MaxEnergy"]);
                PlayerPrefs.SetString("PlayerLevel", jsonString["data"]["PlayerLevel"]);
                PlayerPrefs.SetString(Link.GOLD, jsonString["data"]["coin"]);
                PlayerPrefs.SetString(Link.SOUL_STONE, jsonString["data"]["soulstone"]);

                PlayerPrefs.SetString(Link.COMMON, jsonString["data"]["common"]);
                PlayerPrefs.SetString(Link.RARE, jsonString["data"]["rare"]);
                PlayerPrefs.SetString(Link.LEGENDARY, jsonString["data"]["legendary"]);
                if (login_by != "FB")
                {
                    int hasil;
                    var hasilnya = int.TryParse(jsonString["data"]["image"], out hasil);
                    if (hasilnya)
                    {
                        PlayerPrefs.DeleteKey("Base64PictureProfile");
                    }
                    else
                    {
                        StartCoroutine(showAvatar());
                    }
                }
                StartCoroutine(DQItemList());
                //   StartCoroutine(AchievementList());

                break;

            case 2:
                //         StartCoroutine(AnimasiInformasiServer("Wrong Password"));
                break;

            case 3:
                //        StartCoroutine(AnimasiInformasiServer("Email Not Registered Yet. Please Register"));
                break;

            case 4:
                //       StartCoroutine(AnimasiInformasiServer("This User Already Login On Another Device"));
                break;

            case 5:
                //      StartCoroutine(AnimasiInformasiServer("Invalid Email Format"));
                break;

            case 6:
                //      StartCoroutine(AnimasiInformasiServer("Check Your Email for Verification"));
                break;

            case 71:
                async = Application.LoadLevelAsync(scene);

                //	StartCoroutine (AnimasiInformasiServer("Please Update to the newest version"));
                //				PlayerPrefs.DeleteKey(Link.LOGIN_BY);
                //				PlayerPrefs.DeleteKey(Link.STATUS_LOGIN);
                //Application.OpenURL(jsonString ["Url"]);
                break;

            default:
                async = Application.LoadLevelAsync(scene);

                //     StartCoroutine(AnimasiInformasiServer("Something Wrong. Try Again Later"));
                break;
            }
        }
        else
        {
            //       StartCoroutine(AnimasiInformasiServer("Something Wrong. Try Again Later"));
        }
    }
コード例 #30
0
ファイル: Home.cs プロジェクト: MonkeyDKid/XKuntilanakXPocong
 public void OnPracticeClick()
 {
     SceneManagerHelper.LoadScene(Link.Practice);
 }