// Use this for initialization void Start() { gpgScript = GetComponent <GPGScript>(); if (!PlayerPrefs.HasKey("expEarned")) { PlayerPrefs.SetFloat("expEarned", 0.0f); } if (!PlayerPrefs.HasKey("playerLevel")) { PlayerPrefs.SetInt("playerLevel", 1); } if (!PlayerPrefs.HasKey("skillPoints")) { PlayerPrefs.SetInt("skillPoints", 1); } if (!PlayerPrefs.HasKey("swipeCap")) { PlayerPrefs.SetInt("swipeCap", 20); } insufficient = GameObject.Find("sfxInsufficientGold").GetComponent <AudioSource>(); btnPush = GameObject.Find("sfxBtnPush").GetComponent <AudioSource>(); btnCharacters = GameObject.Find("Characters"); try { boolChangerScript = btnCharacters.GetComponent <animationBoolChanger>(); } catch (System.Exception) { } if (!PlayerPrefs.HasKey("firstSkill") && !ftStep1.activeSelf) { objmainmenu.SetActive(false); objtopicons.SetActive(false); try { boolChangerScript.changeBoolean(); } catch (Exception) { } ftStep0.SetActive(true); back_shop.SetActive(true); back_shop.GetComponent <Button>().interactable = false; } //load SP and skills loadSPSkills(); }
// Use this for initialization void Start() { changeSceneScript = GameObject.Find("Play").GetComponent <ChangeScene>(); purchase = GameObject.Find("sfxPurchasing").GetComponent <AudioSource>(); insufficient = GameObject.Find("sfxInsufficientGold").GetComponent <AudioSource>(); btnSfxPush = GameObject.Find("sfxBtnPush").GetComponent <AudioSource>(); boolChangerScript = GameObject.Find("scrollViewStages").GetComponent <animationBoolChanger>(); PlayerPrefs.SetInt("stageGame_unlocked", 1); if (PlayerPrefs.HasKey("stage" + goTo + "_unlocked")) { coin.SetActive(false); price.SetActive(false); imgPlay.SetActive(true); } }