// Use this for initialization
 void Awake()
 {
     googleGame = GameObject.Find("LittleRockstarGoogleGame").GetComponent<LittleRockstarGoogleGame>();
     #if UNITY_IOS
     GameObject.Find("AchievementButton").SetActive(false);
     #endif
 }
    // Use this for initialization

    void Awake()
    {
        googleGame = GameObject.Find("LittleRockstarGoogleGame").GetComponent <LittleRockstarGoogleGame>();
#if UNITY_IOS
        GameObject.Find("AchievementButton").SetActive(false);
#endif
    }
    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> ();
 }
Beispiel #5
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else if (_instance != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #6
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");
    }
 void Awake()
 {
     if (_instance == null)
         _instance = this;
     else if (_instance != this)
     {
         Destroy(gameObject);
     }
 }
 // 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> ();
 }