Example #1
0
    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();
    }
Example #2
0
    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();
    }