void Start() { GIFTS = GameObject.FindGameObjectsWithTag("gifts"); REWARDS = GameObject.FindGameObjectsWithTag("ChallangeReward"); PROGRESS_IMGS = GameObject.FindGameObjectsWithTag("ChallangeDone"); currentKills = PlayerPrefs.GetInt("totalKills", 0); Debug.Log(currentKills + " current kills" + " rewards num: " + REWARDS.Length); GiftManager(); numOfCoins = CoinsSideBarAnime.gameObject.GetComponentInChildren <Text>(); numOfKills = KillCounterSideBarAnime.gameObject.GetComponentInChildren <Text>(); ManageTxtValue_Coins(PlayerPrefs.GetInt("coins", 0)); ManageTxtValue_Kills(PlayerPrefs.GetInt("totalKills", 0)); sounds = GameObject.FindGameObjectWithTag("BGMusic").GetComponent <LevelAudioManager>(); Instance.ClaimedAll = 0; Instance.Save(); }
private void Awake() { Instance = this; DontDestroyOnLoad(this.gameObject); }