示例#1
0
 public void Restart()
 {
     if (null != GDSMgr)
     {
         GDSMgr.DestroyGDS();
         GDSMgr = null;
     }
     if (null != LanguageMgr)
     {
         LanguageMgr.Destroy();
         LanguageMgr = null;
     }
     if (null != ProxyMgr)
     {
         ProxyMgr.Destroy();
         ProxyMgr = null;
     }
     EventMgr.Destroy();
     SceneMgr.Destroy();
     StateMgr.Destroy();
     PlatformMgr.Destroy();
     ResMgr.Destroy();
     GameSceneMgr.Destroy();
     Instance = null;
     GameObject.Destroy(gameObject);
     SceneMgr.EnterScene("Lancher", null);
     EffectManager.Instance.ClearAllEffect();
 }
示例#2
0
    public void Init()
    {
        SystemLanguage localLanguage = PlatformMgr.GetSystemLanguage();

        if (localLanguage == SystemLanguage.Chinese)
        {
            currentLang = "SChinese";
        }
        else if (localLanguage == SystemLanguage.ChineseSimplified)
        {
            currentLang = "SChinese";
        }
        else if (localLanguage == SystemLanguage.ChineseTraditional)
        {
            currentLang = "TChinese";
        }
        else if (localLanguage == SystemLanguage.Japanese)
        {
            currentLang = "Japanese";
        }
        else
        {
            currentLang = "English";
        }

        LoadAllString();
    }
示例#3
0
    void BaseInit()
    {
        {
            //  persistentDataPath
            BaseStorageFolder =
#if UNITY_STANDALONE_WIN
                Application.persistentDataPath;
#endif

#if UNITY_IPHONE
                Application.persistentDataPath;
#endif

#if UNITY_ANDROID
#if UNITY_EDITOR
                Application.persistentDataPath;
#else
                string.IsNullOrEmpty(Application.persistentDataPath) ? PlatformMgr.Cardname() : Application.persistentDataPath;
#endif
#endif
                Debuger.Log("BaseStorageFolder->" + BaseStorageFolder);
        }

        {
            bJarflag = BaseStorageFolder.Contains("!/") ? true : false;
        }

        {
            /// <summary>
            /// ²»Í¬ÔËÐÐƜ̚StreamingAssetsµÄ·Ÿ¶
            /// </summary>
            BaseVersionAssets =
#if UNITY_STANDALONE_WIN
        #if UNITY_EDITOR
                //Application.dataPath + "/../../GameEditors";
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_png";
#else
                //Application.dataPath;
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_png";
#endif
#endif

#if UNITY_IPHONE
#if UNITY_EDITOR
                //Application.dataPath + "/../../GameEditors";
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_pvr";
#else
                //Application.dataPath + "/Raw";
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_pvr";
                        #endif
#endif

#if UNITY_ANDROID
#if UNITY_EDITOR
//    Application.dataPath + "/../../GameEditors";
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_etc";
#else                    //  ÔËÐÐʱ
#if UNITY_STANDALONE_WIN // PCƽ̨ϵݲ׿
                //Application.dataPath ;
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_etc";
#else
                //Application.dataPath + "!/assets";
                //  MPQ模式.
                StorageFolder + "/MPQ/updates_etc";
#endif
#endif
#endif

                BaseStreamingAssets = BaseVersionAssets + "/StreamingAssets";
            Debuger.Log("BaseStreamingAssets->" + BaseStreamingAssets);
        }

        {
            /// <summary>
            /// ²»Í¬ÔËÐÐƜ̚StreamingAssetsµÄ·Ÿ¶
            /// </summary>
            BaseMPQ =
#if UNITY_STANDALONE_WIN
        #if UNITY_EDITOR
                Application.dataPath + "/../../GameEditors";
#else
                Application.dataPath + "/StreamingAssets";
#endif
#endif

#if UNITY_IPHONE
#if UNITY_EDITOR
                Application.dataPath + "/../../GameEditors/StreamingAssets";
#else
                Application.dataPath + "/Raw";
#endif
#endif

#if UNITY_ANDROID
#if UNITY_EDITOR
                Application.dataPath + "/../../GameEditors/StreamingAssets";
#else                    //  ÔËÐÐʱ
#if UNITY_STANDALONE_WIN // PCƽ̨ϵݲ׿
                Application.dataPath + "/StreamingAssets";
#else
                Application.dataPath + "!/assets";
#endif
#endif
#endif
                Debuger.Log("BaseMPQ->" + BaseMPQ);
        }

        {
            /// <summary>
            /// ²»Í¬ÔËÐÐƜ̚ÏÂStreamingAssetsµÄÎÄŒþŒÐ
            /// </summary>
            BasePlatformFolder =
#if UNITY_STANDALONE_WIN
                "/PC";
#elif UNITY_IPHONE
                "/IOS";
#elif UNITY_ANDROID
                "/Android";
#endif
            Debuger.Log("BasePlatformFolder->" + BasePlatformFolder);
        }

        {
            PrefixPlatform =
#if UNITY_STANDALONE_WIN
                "file:///";
#elif UNITY_IPHONE
                #if UNITY_EDITOR
                "file:///";
                #else
                "file://";
                #endif
#elif UNITY_ANDROID
#if UNITY_EDITOR
                "file:///";
        #else
                bJarflag ? "jar:file://" : "file://";
                #endif
#else
                "Not valid Platform";
#endif
            Debuger.Log("PrefixPlatform->" + PrefixPlatform);
        }

        {
            SoundPrefixPlatform =
#if UNITY_STANDALONE_WIN
                ".ogg";
#elif UNITY_IPHONE
                ".mp3";
#elif UNITY_ANDROID
                ".mp3";
#else
                "Not valid Platform";
#endif
            Debuger.Log("SoundPrefixPlatform->" + SoundPrefixPlatform);
        }
    }