예제 #1
0
    public void ArcadeModel()
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        string difficultys = "";

        for (int i = 0; i < GameOptionService.DifficultyLevels.Count; i++)
        {
            difficultys += "|" + GameOptionService.DifficultyLevels[i];
        }

        string types = "";

        for (int i = 0; i < GameOptionService.PoemTypes.Count; i++)
        {
            types += "|" + GameOptionService.PoemTypes[i];
        }

        data.Add("GameType", "normal");
        data.Add("DifficultyLevels", difficultys);
        data.Add("PoemTypes", types);

        SDKManager.Log("StartGame", data);

        GameLogic.s_GameModel = GameModel.Arcade;
        PoemLibrary.SetPoemByTag(GameOptionService.DifficultyLevels, GameOptionService.PoemTypes);
        ApplicationStatusManager.EnterStatus <GameStatus>();
    }
예제 #2
0
 public override void OnUpdate()
 {
     if (Application.platform == RuntimePlatform.Android &&
         (Input.GetKeyDown(KeyCode.Escape)) ||
         Input.GetKeyDown(KeyCode.Q))
     {
         ApplicationStatusManager.EnterStatus <MainMenuState>();
     }
 }
예제 #3
0
    /// <summary>
    /// 程序启动
    /// </summary>
    public void AppLaunch()
    {
        DontDestroyOnLoad(gameObject);
        Application.runInBackground = true;
        Screen.sleepTimeout         = SleepTimeout.NeverSleep;

        SetResourceLoadType(useCacheWhenLoadResource);               //设置资源加载类型

        AudioPlayManager.Init();
        MemoryManager.Init();                //内存管理初始化
        Timer.Init();                        //计时器启动
        InputManager.Init();                 //输入管理器启动

#if !UNITY_WEBGL
        UIManager.Init();                    //UIManager启动
#else
        UIManager.InitAsync();               //异步加载UIManager
#endif
        ApplicationStatusManager.Init();     //游戏流程状态机初始化
        GlobalLogicManager.Init();           //初始化全局逻辑

        if (AppMode != AppMode.Release)
        {
            GUIConsole.Init(); //运行时Console

            DevelopReplayManager.OnLunchCallBack += () =>
            {
                SDKManager.Init();                   //初始化SDKManger
#if USE_LUA
                LuaManager.Init();
#endif
                InitGlobalLogic();                                 //全局逻辑
                ApplicationStatusManager.EnterTestModel(m_Status); //可以从此处进入测试流程
            };

            DevelopReplayManager.Init(m_quickLunch);   //开发者复盘管理器
            LanguageManager.Init();
        }
        else
        {
            Log.Init(false);   //关闭 Debug
            SDKManager.Init(); //初始化SDKManger
#if USE_LUA
            LuaManager.Init();
#endif
            InitGlobalLogic();                              //全局逻辑
            ApplicationStatusManager.EnterStatus(m_Status); //游戏流程状态机,开始第一个状态

            LanguageManager.Init();
        }


        if (s_OnApplicationModuleInitEnd != null)
        {
            s_OnApplicationModuleInitEnd();
        }
    }
 void ReceviceHotUpdateProgress(HotUpdateStatusInfo info)
 {
     if (info.m_loadState.isDone)
     {
         ApplicationStatusManager.EnterStatus <MainMenuState>();
     }
     else
     {
         m_window.HotUpdate(info);
     }
 }
    void OnClickExercise(InputUIOnClickEvent e)
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        data.Add("GameType", "FavoritesList");
        data.Add("FavoritesListCount", FavoritesService.GetFavoritesList().Count);
        SDKManager.Log("StartGame", data);

        UIManager.CloseUIWindow(this);

        GameLogic.s_GameModel = GameModel.normal;
        PoemLibrary.SetPoemByFavorite(FavoritesService.GetFavoritesList());
        ApplicationStatusManager.EnterStatus <GameStatus>();
    }
 static int EnterStatus(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         string arg0 = ToLua.CheckString(L, 1);
         ApplicationStatusManager.EnterStatus(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #7
0
    void OnClickExercise(InputUIOnClickEvent e)
    {
        Dictionary <string, object> data = new Dictionary <string, object>();

        data.Add("GameType", "singlePoem");
        data.Add("poemName", s_poemData.m_key);
        SDKManager.Log("StartGame", data);

        UIManager.CloseUIWindow(this);

        GameLogic.s_GameModel = GameModel.normal;
        PoemLibrary.SetPoemByName(s_poemData.m_key);
        ApplicationStatusManager.EnterStatus <GameStatus>();
    }
예제 #8
0
    /// <summary>
    /// 程序启动
    /// </summary>
    public void AppLaunch()
    {
        DontDestroyOnLoad(gameObject);
        SetResourceLoadType();               //设置资源加载类型
        ResourcesConfigManager.Initialize(); //资源路径管理器启动

        MemoryManager.Init();                //内存管理初始化
        Timer.Init();                        //计时器启动
        InputManager.Init();                 //输入管理器启动

#if !UNITY_WEBGL
        UIManager.Init();                    //UIManager启动
#else
        UIManager.InitAsync();               //异步加载UIManager
#endif

        ApplicationStatusManager.Init();     //游戏流程状态机初始化
        GlobalLogicManager.Init();           //初始化全局逻辑

        if (AppMode != AppMode.Release)
        {
            GUIConsole.Init(); //运行时Console

            DevelopReplayManager.OnLunchCallBack += () =>
            {
#if USE_LUA
                LuaManager.Init();
#endif
                InitGlobalLogic();                                 //全局逻辑
                ApplicationStatusManager.EnterTestModel(m_Status); //可以从此处进入测试流程
            };

            DevelopReplayManager.Init(m_quickLunch);   //开发者复盘管理器
        }
        else
        {
            Log.Init(false); //关闭 Debug

#if USE_LUA
            LuaManager.Init();
#endif
            InitGlobalLogic();                              //全局逻辑
            ApplicationStatusManager.EnterStatus(m_Status); //游戏流程状态机,开始第一个状态
        }
    }
예제 #9
0
    /// <summary>
    /// 程序启动
    /// </summary>
    public void AppLaunch()
    {
        DontDestroyOnLoad(gameObject);
        SetResourceLoadType();               //设置资源加载类型
        ResourcesConfigManager.Initialize(); //资源路径管理器启动

        MemoryManager.Init();                //内存管理初始化
        HeapObjectPool.Init();
        Timer.Init();                        //计时器启动
        InputManager.Init();                 //输入管理器启动
        UIManager.Init();                    //UIManager启动

        ApplicationStatusManager.Init();     //游戏流程状态机初始化
        GlobalLogicManager.Init();           //初始化全局逻辑

        if (m_AppMode != AppMode.Release)
        {
            GUIConsole.Init(); //运行时Console

            DevelopReplayManager.OnLunchCallBack += () =>
            {
                if (m_useLua)
                {
                    LuaManager.Init();
                }

                InitGlobalLogic();                                 //全局逻辑
                ApplicationStatusManager.EnterTestModel(m_Status); //可以从此处进入测试流程
            };

            DevelopReplayManager.Init(m_quickLunch);   //开发者复盘管理器
        }
        else
        {
            Log.Init(false); //关闭 Debug

            if (m_useLua)
            {
                LuaManager.Init();
            }

            InitGlobalLogic();                              //全局逻辑
            ApplicationStatusManager.EnterStatus(m_Status); //游戏流程状态机,开始第一个状态
        }
    }
예제 #10
0
    /// <summary>
    /// 程序启动
    /// </summary>
    public void AppLaunch()
    {
        SetResourceLoadType();            //设置资源加载类型
        BundleConfigManager.Initialize(); //资源路径管理器启动
        Log.Init();                       //日志系统启动
        ApplicationStatusManager.Init();  //游戏流程状态机初始化

        //初始化全局逻辑
        InitGlobalLogic();

        if (m_AppMode != AppMode.Release)
        {
            GUIConsole.Init();                                    //运行时Debug
            ApplicationStatusManager.EnterTestModel(m_Status);    //可以从此处进入测试流程
        }
        else
        {
            //游戏流程状态机,开始第一个状态
            ApplicationStatusManager.EnterStatus(m_Status);
        }
    }
예제 #11
0
    /// <summary>
    /// 程序启动
    /// </summary>
    public void AppLaunch()
    {
        DontDestroyOnLoad(this);
        SetResourceLoadType();               //设置资源加载类型
        ResourcesConfigManager.Initialize(); //资源路径管理器启动

        InputManager.Init();                 //输入管理器启动
        UIManager.Init();                    //UIManager启动

        ApplicationStatusManager.Init();     //游戏流程状态机初始化

        //初始化全局逻辑
        GlobalLogicManager.Init();

        if (m_AppMode != AppMode.Release)
        {
            GUIConsole.Init(); //运行时Console

            DevelopReplayManager.OnLunchCallBack += () =>
            {
                LuaManager.Init();
                InitGlobalLogic();                                 //全局逻辑
                ApplicationStatusManager.EnterTestModel(m_Status); //可以从此处进入测试流程
            };

            DevelopReplayManager.Init(m_quickLunch);   //开发者复盘管理器
        }
        else
        {
            Log.Init(false); //关闭 Debug

            LuaManager.Init();
            //全局逻辑
            InitGlobalLogic();
            //游戏流程状态机,开始第一个状态
            ApplicationStatusManager.EnterStatus(m_Status);
        }
    }
예제 #12
0
 void OnClickFavorite(InputUIOnClickEvent e)
 {
     SDKManager.Log("OpenFavorite", null);
     ApplicationStatusManager.EnterStatus <FavoriteStatus>();
 }
예제 #13
0
 void OnClickReturn(InputUIOnClickEvent e)
 {
     ApplicationStatusManager.EnterStatus <MainMenuState>();
 }
예제 #14
0
 void OnClickReturnMainMenu(InputUIOnClickEvent e)
 {
     ApplicationStatusManager.EnterStatus <DemoStatus>();
 }
예제 #15
0
 public void Back()
 {
     ApplicationStatusManager.EnterStatus <MainMenuState>();
 }
예제 #16
0
 public void OnGameStart(InputUIOnClickEvent e)
 {
     ApplicationStatusManager.EnterStatus <GameStatus>();
 }
예제 #17
0
 void OnClickOption(InputUIOnClickEvent e)
 {
     SDKManager.Log("OpenOption", null);
     ApplicationStatusManager.EnterStatus <OptionState>();
 }
예제 #18
0
 void OnClickNormalModel(InputUIOnClickEvent e)
 {
     ApplicationStatusManager.EnterStatus <ModelSelectState>();
 }