void Start() { if (PlayerPrefs.GetString("Base64PictureProfile") != "") { byte[] b64_bytes = System.Convert.FromBase64String(PlayerPrefs.GetString("Base64PictureProfile")); Texture2D tex = new Texture2D(1, 1); tex.LoadImage(b64_bytes); var rect = new Rect(0, 0, tex.width, tex.height); if (tex.height != 8) { Profile.overrideSprite = Sprite.Create(tex, rect, Vector2.zero, 128.0f); } else { //anotherpopup.SetActive (true); } } StartCoroutine(CheckConnectionToMasterServer()); if (PlayerPrefs.HasKey("NoAni")) { if (PlayerPrefs.GetString("NoAni") == "ON") { aniOFF.SetActive(false); aniOFF2.SetActive(false); aniON.SetActive(true); aniON2.SetActive(true); } else { aniOFF.SetActive(true); aniOFF2.SetActive(true); aniON.SetActive(false); aniON2.SetActive(false); } } else { PlayerPrefs.SetString("NoAni", "ON"); } Debug.Log(PlayerPrefs.GetString("PLAY_TUTORIAL")); PlayerPrefs.SetString("berburu", "tidak"); FirstTimerGO.SetActive(false); FirstTimerGO2.SetActive(false); MusicSlide.onValueChanged.AddListener(delegate { ValueChangeCheck(); }); SoundFXSlide.onValueChanged.AddListener(delegate { ValueChangeCheck2(); }); if (PlayerPrefs.HasKey("Music") && PlayerPrefs.HasKey("SoundsFX")) { MusicSlide.value = PlayerPrefs.GetFloat("Music"); SoundFXSlide.value = PlayerPrefs.GetFloat("SoundsFX"); } else { PlayerPrefs.SetFloat("Music", 1.0f); PlayerPrefs.SetFloat("SoundsFX", 1.0f); SoundFXSlide.value = 1; MusicSlide.value = 1; } StartCoroutine(GetDataUser()); //PlayerPrefs.DeleteAll (); // PlayerPrefs.SetInt ("FT", 0); // PlayerPrefs.SetString ("PLAY_TUTORIAL", "TRUE"); if (PlayerPrefs.GetString("GoShop") == "yes") { GOSHOP.SetActive(true); StartCoroutine(GetDataUser()); PlayerPrefs.SetString("GoShop", "no"); } if (PlayerPrefs.HasKey("PLAY_TUTORIAL")) { if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "FALSE") { FirstTimerGO.SetActive(false); Story.SetActive(false); if (PlayerPrefs.GetString("lewat") == "ya") { FirstTimerGO2.SetActive(true); } } else { // Story.SetActive(true); //FirstTimerGO.SetActive(true); Camera.GetComponent <Animator>().Play("HomeCameraAnimation"); } if (PlayerPrefs.GetString("SummonTutor") == "UDAH") { if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "TRUE") { SceneManagerHelper.LoadTutorial("Home_2"); } else { SceneManagerHelper.LoadTutorial("Home_3"); } Camera.GetComponent <Animator>().Play("HomeCameraAnimation"); Story.SetActive(false); } else if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "TRUE") { StartCoroutine(WaitTime()); } } // } // else { // FirstTimerGO.SetActive(false); // Story.SetActive(false); // } // if (PlayerPrefs.GetString("PLAY_TUTORIAL") == "FALSE") // { // FirstTimerGO.SetActive(false); // Story.SetActive(false); // if (PlayerPrefs.GetString ("lewat") == "ya") { // FirstTimerGO2.SetActive(true); // } // } }
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(); } }
public void StartDialog(string name) { SceneManagerHelper.LoadTutorial(name); }