Example #1
0
    void Awake()
    {
#if UNITY_IPHONE
		Environment.SetEnvironmentVariable ("MONO_REFLECTION_SERIALIZER", "yes");
#endif

        if (SceneManager.GetActiveScene().Equals("Menu"))
        {
            Destroy(gameObject);
            return;
        }
        if (handler == null)
        {
            DontDestroyOnLoad(this.gameObject);
            handler = this;
        }
        else if (handler != this)
        {
            Destroy(gameObject);
        }
        googleGame = GameObject.Find("LittleRockstarGoogleGame").GetComponent<LittleRockstarGoogleGame>();
        Load();
        Debug.Log("Application File saving place: " + Application.persistentDataPath);
        //File.Delete(Application.persistentDataPath + "/data.dat"); 			
    }
 // Use this for initialization
 void Awake()
 {
     highscores   = GetComponent <Highscores> ();
     player       = GameObject.Find("RockPlayer");
     gameTime     = GameObject.Find("GameTimeView").GetComponent <GameTimeView> ();
     levelHandler = GameObject.Find("LevelHandler").GetComponent <LevelHandlerC> ();
     gameUIHelper = GameObject.Find("GameUIHelper").GetComponent <GameUIHelper> ();
     googleGame   = GameObject.Find("LittleRockstarGoogleGame").GetComponent <LittleRockstarGoogleGame> ();
 }
Example #3
0
    void Awake()
    {
#if UNITY_IPHONE
        Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes");
#endif

        if (SceneManager.GetActiveScene().name.Equals(RockstarScenes.Menu))
        {
            Destroy(gameObject);
            return;
        }
        if (handler == null)
        {
            DontDestroyOnLoad(this.gameObject);
            handler = this;
        }
        else if (handler != this)
        {
            Destroy(gameObject);
        }
        googleGame = GameObject.Find("LittleRockstarGoogleGame").GetComponent <LittleRockstarGoogleGame>();
        Load();
        //File.Delete(Application.persistentDataPath + "/data.dat");
    }
 // Use this for initialization
 void Awake()
 {
     highscores = GetComponent<Highscores> ();
     player = GameObject.Find ("RockPlayer");
     gameTime = GameObject.Find ("GameTimeView").GetComponent<GameTimeView> ();
     levelHandler = GameObject.Find ("LevelHandler").GetComponent<LevelHandlerC> ();
     gameUIHelper = GameObject.Find ("GameUIHelper").GetComponent<GameUIHelper> ();
     googleGame = GameObject.Find ("LittleRockstarGoogleGame").GetComponent<LittleRockstarGoogleGame> ();
 }