Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //Debuger.EnableLog = true;
        //Debuger.EnableSave = true;
        Debuger.Log(Debuger.LogFileDir);
        //reset();
        GameData.InitGameData();
        AppConfig.Init();
        UserData ud = AppConfig.Value.mainUserData;

        UserManager.Instance.UpdateMainUserData(ud);
        //Debug.Log(Application.persistentDataPath);
        InitServices();
        InitBusiness();
        if (ud.IsAdven)
        {
            UIAPI.ShowMsgBox("提示", "是否继续未完的冒险", "继续|不了", arg => {
                if ((int)arg == 0)
                {
                    UIManager.MainScene = "Adventure";
                    SceneManager.LoadScene("Loading");
                }
                else
                {
                    AppConfig.Value.mainUserData.IsAdven     = false;
                    AppConfig.Value.mainUserData.dataControl = null;
                    AppConfig.Save();
                    GameAPI.CheckTime();
                }
            });
        }
        else
        {
            if (!ud.GuideFlag[GuideAPI.EnterTransPage])
            {
                GuideAPI.EnterTransPageFunc();
            }
            else if (!(!ud.GuideFlag[GuideAPI.FightEnd] && ud.GuideFlag[GuideAPI.FightStart]))
            {
                GameAPI.CheckTime();
            }
        }
    }