Пример #1
0
    // Use this for initialization

    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
            return;
        }
        instance = this;

        DontDestroyOnLoad(gameObject);
    }
Пример #2
0
    // Use this for initialization
    void Awake()
    {
        #if UNITY_IOS
        return;
        #endif
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;

        }
        DontDestroyOnLoad(this.gameObject);
    }
Пример #3
0
    void Awake()
    {
        backgroundClouds.SetActive(false);
        int levelsDone = PlayerPrefsManager.GetLevelsDone();

        if (levelsDone >= showBackgroundCloudsAfterNumLevels)
        {
            backgroundClouds.SetActive(true);
        }
        else
        {
            backgroundClouds.SetActive(false);
        }

        littleRockstarAds = GameObject.FindGameObjectWithTag("Ads").GetComponent <LittleRockstarAds>();
        rockPlayer        = GameObject.Find("RockPlayer").GetComponent <RockPlayer>();
    }
    void Awake()
    {
        backgroundClouds.SetActive(false);
        int levelsDone = PlayerPrefsManager.GetLevelsDone();
        if (levelsDone >= 10)
        {
            print("LevelsDone TRUE");
            backgroundClouds.SetActive(true);
        }
        else
        {
            backgroundClouds.SetActive(false);
            print("LevelsDone FALSE");
        }

        littleRockstarAds = GameObject.FindGameObjectWithTag("Ads").GetComponent<LittleRockstarAds>();
        rockPlayer = GameObject.Find("RockPlayer").GetComponent<RockPlayer>();
    }