Beispiel #1
0
        /// <summary>
        /// when the main player is died
        /// </summary>
        private void OnMainPlayerDie()
        {
            m_game.Pause();

            MsgBoxAPI.ShowMsgBox("You died!!!", "reborn to play again?", "exit|continue", (arg) =>
            {
                if ((int)arg == 0)
                {
                    m_game.Terminate();
                }
                else
                {
                    m_game.Resume();
                    m_game.RebornPlayer();
                }
            });
        }
        /// <summary>
        /// 当主玩家死时
        /// </summary>
        private void OnMainPlayerDie()
        {
            m_game.Pause();

            UIAPI.ShowMsgBox("死亡!!!", "是否重生继续游戏?", "确定退出|继续游戏", (arg) =>
            {
                if ((int)arg == 0)
                {
                    //中止游戏
                    m_game.Terminate();
                }
                else
                {
                    //恢复和重生游戏
                    m_game.Resume();
                    m_game.RebornPlayer();
                }
            });
        }