Exemplo n.º 1
0
        /// <summary>
        /// 游戏推出
        /// </summary>
        /// <param name="v"></param>
        public static void Exit(int v)
        {
            switch (v)
            {
            case 0:
                Application.Quit();
                break;

            case 1:
                UIManager.GetUI <UI_Ask>().Use(new UI_Ask_Context()
                {
                    Message  = Writing.Get(200001),
                    Callback = (_yn, _ask) =>
                    {
                        if (_yn)
                        {
                            SaveFile();
                            Exit(0);
                        }
                        _ask.UseDone();
                    }
                });
                break;

            default:
                Application.Quit();
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 加载文本
        /// </summary>
        /// <returns></returns>
        public static IEnumerator LoadText(Language tar = Language.Chinese)
        {
            WWW www = new WWW(CFG.WWWstreamingAssetsPathPrefix + Application.streamingAssetsPath + "/Text.xml");

            while (!www.isDone)
            {
                yield return(null);
            }

            Writing.Init(XElement.Parse(www.text), tar);
            //Text.AddItem(XElement.Parse(www.text), 100101, 100130).Save(Application.streamingAssetsPath + "/Text.xml");
            Writing.CurrentLanguage = tar;
        }
Exemplo n.º 3
0
 private void ReSetText()
 {
     text.text = Writing.Get(TextNum);
     language  = Writing.CurrentLanguage;
 }