Esempio n. 1
0
        private static void Load()
        {
            TextAsset str = Resources.Load <TextAsset> ("Lang/" + currentLanguage);

            LanguageConfigs = JSONNode.Parse(str.ToString());
            XLAFInnerLog.Debug("bytes", LanguageConfigs);
        }
Esempio n. 2
0
 private void TimeOutEnded()
 {
     if (!isRunning)
     {
         return;
     }
     XLAFInnerLog.Debug("TimeOutEnded");
     isRunning = false;
     MgrBackdoor.clickedTimes = 0;
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="XLAF.Public.SceneObject"/> class without asset bundle.
        /// </summary>
        /// <param name="fullSceneNamePath">Full scene name path.</param>
        public SceneObject(string fullSceneNamePath)
        {
            string[] tmp = fullSceneNamePath.Split('/');
            this._sceneName = tmp [tmp.Length - 1];
            UnityEngine.Object _prefab = Resources.Load(fullSceneNamePath);
            XLAFInnerLog.Debug(fullSceneNamePath);
            GameObject scene = (GameObject)UnityEngine.Object.Instantiate(_prefab);

            initAttr(scene, _sceneName);
        }
Esempio n. 4
0
        //		/// <summary>
        //		/// Loads the bundle.
        //		/// </summary>
        //		/// <returns>The bundle all.</returns>
        //		/// <param name="path">Path.</param>
        //		/// <param name="sceneName">Scene name.</param>
        //		private IEnumerator LoadBundle (string path, string sceneName)
        //		{
        //			WWW bundle = new WWW (path);
        //			yield return bundle;
        //			GameObject scene = (GameObject)UnityEngine.Object.Instantiate (bundle.assetBundle.LoadAsset (sceneName));
        //			initAttr (scene, sceneName);
        //			yield return 1;
        //		}

        /// <summary>
        /// Initializes a new instance of the <see cref="XLAF.Public.SceneObject"/> class with asset bundle.
        /// </summary>
        /// <param name="assetBundleFullPathName">AssetBundle full path name. <para></para>
        /// e.g. /StreamingAssets/Android/all.assetbundle</param>
        /// <param name="sceneName">Scene name.  e.g. Pop1</param>
        public SceneObject(string assetBundleFullPathName, string sceneName)
        {
            XLAFInnerLog.Debug("New SceneObject:", assetBundleFullPathName, sceneName);
            //use async load will cause setParent not right
            //MgrCoroutine.DoCoroutine (LoadBundle (assetBundleFullPathName, sceneName));
            WWW        bundle = new WWW(assetBundleFullPathName);
            GameObject scene  = (GameObject)UnityEngine.Object.Instantiate(bundle.assetBundle.LoadAsset(sceneName));

            bundle.assetBundle.Unload(false);
            this._sceneName = sceneName;
            initAttr(scene, sceneName);
        }
Esempio n. 5
0
 /// <summary>
 /// Shows the alert.
 /// </summary>
 /// <param name="title">Title.</param>
 /// <param name="message">Message.</param>
 /// <param name="okLabel">Ok label.</param>
 /// <param name="actionOK">Action O.</param>
 public static void ShowAlert(string title, string message, string okLabel, Action actionOK)
 {
     //!!TODO!!
     XLAFInnerLog.Debug(title, message);
 }
Esempio n. 6
0
 /// <summary>
 /// Shows the alert.
 /// </summary>
 /// <param name="title">Title.</param>
 /// <param name="message">Message.</param>
 /// <param name="okLabel">Ok label.</param>
 /// <param name="cancelLabel">Cancel label.</param>
 /// <param name="neutralLabel">Neutral label.</param>
 /// <param name="actionOK">Action O.</param>
 /// <param name="actionCancel">Action cancel.</param>
 /// <param name="actionNeutral">Action neutral.</param>
 public static void ShowAlert(string title, string message, string okLabel, string cancelLabel, string neutralLabel,
                              Action actionOK, Action actionCancel, Action actionNeutral)
 {
     //!!TODO!!
     XLAFInnerLog.Debug(title, message);
 }
Esempio n. 7
0
 /// <summary>
 /// Determines if has asset bundle the specified sceneName.
 /// </summary>
 /// <returns><c>true</c> if has asset bundle the specified sceneName; otherwise, <c>false</c>.</returns>
 /// <param name="sceneName">Scene name.</param>
 public static bool HasAssetBundle(string sceneName)
 {
     XLAFInnerLog.Debug("HasAssetBundle()", jsonData, sceneName, GetAssetBundlePath(sceneName) != "");
     return(GetAssetBundlePath(sceneName) != "");
 }
Esempio n. 8
0
 static MgrMultiLanguage()
 {
     currentLanguage = MgrData.GetString(MgrData.appSettingsName, "XLAF.language", DEFAULT_LANGUAGE);
     XLAFInnerLog.Debug("currentLanguage", currentLanguage);
     Load();
 }