void Awake() { musicVolume = PlayerPrefs.GetFloat("musicVolume", 1); soundsVolume = PlayerPrefs.GetFloat("soundsVolume", 1); // PlayerPrefs.DeleteAll(); if (!mInstance) { mInstance = this; } else { Destroy(this.gameObject); return; } gameSettings = GetComponent <GameSettings>(); loginManager = GetComponent <LoginManager>(); levelData = GetComponent <LevelData>(); levels = GetComponent <Levels>(); levelsData = GetComponent <LevelsData>(); multiplayerData = GetComponent <MultiplayerData>(); energyManager = GetComponent <EnergyManager>(); musicManager = GetComponent <MusicManager>(); soundManager = GetComponentInChildren <SoundManager>(); notifications = GetComponent <Notifications>(); facebookShare = GetComponent <FacebookShare>(); screenManager = GetComponent <ScreenManager>(); challengesManager = GetComponent <ChallengersManager>(); facebookFriends = GetComponent <FacebookFriends>(); tournament = GetComponent <Tournament>(); // levelsData.Init(); DontDestroyOnLoad(this.gameObject); userData = GetComponent <UserData>(); userData.Init(); multiplayerData.Init(); GetComponent <MusicManager>().Init(); Events.ResetApp += ResetApp; }
void Awake() { if (!mInstance) mInstance = this; else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this.gameObject); loginManager = GetComponent<LoginManager>(); facebookFriends = GetComponent<FacebookFriends>(); userData = GetComponent<UserData>(); userHiscore = GetComponent<UserHiscore>(); ranking = GetComponent<Ranking>(); challengesManager = GetComponent<ChallengersManager>(); challengeData = GetComponent<ChallengeData>(); userData.Init(); }
public void Remind(string _username, string _facebookID) { facebookFriendName = _username; facebookFriendId = _facebookID; string objectID = ""; ChallengersManager cm = Data.Instance.challengesManager; foreach (ChallengersManager.PlayerData data in cm.made) { if (data.facebookID == _facebookID && data.level == levelId) { objectID = data.objectID; } } if (objectID != "") { Events.OnChallengeRemind(objectID, _facebookID); } }
void Awake() { if (!mInstance) { mInstance = this; } else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this.gameObject); loginManager = GetComponent <LoginManager>(); facebookFriends = GetComponent <FacebookFriends>(); userData = GetComponent <UserData>(); userHiscore = GetComponent <UserHiscore>(); ranking = GetComponent <Ranking>(); challengesManager = GetComponent <ChallengersManager>(); challengeData = GetComponent <ChallengeData>(); userData.Init(); }