Exemplo n.º 1
0
    //==============================================
    void OnGameStart(PVPStartParam startParam)
    {
        pvpGame = new PVPGame();
        pvpGame.Start(startParam);

        EventManager.Instance.SendEvent(EventDef.OnEnterBattle);

        CreateBattleView();
    }
Exemplo n.º 2
0
        //----------------------------------------------------------------------
        /// <summary>
        /// 开始游戏
        /// </summary>
        /// <param name="param"></param>
        private void StartGame(PVPStartParam param)
        {
            //创建游戏逻辑
            m_game = new PVPGame();
            m_game.Start(param);

            //当游戏结束时
            m_game.onGameEnd += () =>
            {
                StopGame();
            };

            //显示战斗UI
            UIManager.Instance.OpenPage(UIDef.UIPVPGamePage);
        }
Exemplo n.º 3
0
        //----------------------------------------------------------------------
        /// <summary>
        /// start the game
        /// </summary>
        /// <param name="param"></param>
        private void StartGame(PVPStartParam param)
        {
            //create PVP game
            m_game = new PVPGame();
            m_game.Start(param);

            //when game ends
            m_game.onGameEnd += () =>
            {
                StopGame();
            };

            //show PVP game UI
            UIManager.Instance.OpenPage(UIConst.UIPVPGamePage);
        }