void Update() { if (Input.GetKey(KeyCode.Escape) && Onshop) { GOSHOP.SetActive(false); outshop(); } }
public void OnShop(int shopnumber) { Onshop = true; GOSHOP.SetActive(true); if (shopnumber == 0) { ShopMarket[0].Shop.SetActive(true); ShopMarket[0].ShopButton.SetActive(true); ShopMarket[0].CreditImage.SetActive(true); ShopMarket[0].ImageSelected.SetActive(true); GOSHOP.GetComponent <Shop>().SpecialShopCek(); for (int i = 1; i < 3; i++) { ShopMarket[i].Shop.SetActive(false); ShopMarket[i].ShopButton.SetActive(false); ShopMarket[i].CreditImage.SetActive(false); ShopMarket[i].ImageSelected.SetActive(false); } } else if (shopnumber == 33) { ShopMarket[0].Shop.SetActive(true); ShopMarket[0].ShopButton.SetActive(true); ShopMarket[0].CreditImage.SetActive(true); ShopMarket[0].ImageSelected.SetActive(true); GOSHOP.GetComponent <Shop>().SpecialShopCek(); } else { if (shopnumber == 1) { ShopMarket[1].Shop.SetActive(true); ShopMarket[1].ShopButton.SetActive(true); ShopMarket[1].CreditImage.SetActive(true); ShopMarket[1].ImageSelected.SetActive(true); ShopMarket[2].ImageSelected.SetActive(false); ShopMarket[2].ShopButton.SetActive(true); ShopMarket[0].Shop.SetActive(false); ShopMarket[0].ShopButton.SetActive(false); ShopMarket[0].CreditImage.SetActive(false); ShopMarket[0].ImageSelected.SetActive(false); } GOSHOP.GetComponent <Shop>().CrystalShopCek(); } }
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); // } // } }