Пример #1
0
    void Awake()
    {
        QualitySettings.vSyncCount = 1;

        if (!mInstance)
        {
            mInstance = this;
        }
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this.gameObject);

        clothesSettings = GetComponent <ClothesSettings>();
        enemiesManager  = GetComponent <EnemiesManager>();
        gameData        = GetComponent <GameData>();
        gameSettings    = GetComponent <GameSettings>();
        areasManager    = GetComponent <AreasManager>();
        musicManager    = GetComponent <MusicManager>();
        soundManager    = GetComponent <SoundManager>();
        combosManager   = GetComponent <CombosManager>();
        specialItems    = GetComponent <SpecialItemsManager>();
        moodsManager    = GetComponent <MoodsManager>();
        texts           = GetComponent <Texts>();

        GetComponent <MusicManager>().Init();
        GetComponent <SoundManager>().Init();
        moodsManager.Init();

//#if UNITY_ANDROID || UNITY_IPHONE
        // Handheld.PlayFullScreenMovie(movPath, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.AspectFill);
//#endif
    }
Пример #2
0
    void Awake()
    {
        QualitySettings.vSyncCount = 1;

        if (!mInstance)
            mInstance = this;
        else
        {
            Destroy(this.gameObject);
            return;
        }

        DontDestroyOnLoad(this.gameObject);

        clothesSettings = GetComponent<ClothesSettings>();
        enemiesManager = GetComponent<EnemiesManager>();
        gameData = GetComponent<GameData>();
        gameSettings = GetComponent<GameSettings>();
        areasManager = GetComponent<AreasManager>();
        musicManager = GetComponent<MusicManager>();
        soundManager = GetComponent<SoundManager>();
        combosManager = GetComponent<CombosManager>();
        specialItems = GetComponent<SpecialItemsManager>();
        moodsManager = GetComponent<MoodsManager>();
        texts = GetComponent<Texts>();

        GetComponent<MusicManager>().Init();
        GetComponent<SoundManager>().Init();
        moodsManager.Init();

        //#if UNITY_ANDROID || UNITY_IPHONE
           // Handheld.PlayFullScreenMovie(movPath, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.AspectFill);
        //#endif
    }