Beispiel #1
0
        void ReloadConfigs()
        {
            if (EnableApplyNewConfigs == 1)
            {
                gameLogic.ApplyNewConfigs(room.gameInfo.jConfigs, room.grade);
                EnableApplyNewConfigs = 0;

                Console.WriteLine("游戏【{0}】桌号:{1}已重新加载配置",
                                  room.gameInfo.name, id);
            }
        }
Beispiel #2
0
        public Table(Room room)
        {
            id        = tableIdCounter++;
            this.room = room;

            try
            {
                gameLogic = Activator.CreateInstance(room.gameInfo.gameLogicType) as IGameLogic;
                gameLogic.ApplyNewConfigs(room.gameInfo.jConfigs, room.grade);
                gameLogic.Init(this, Program.dbHelper);
            }
            catch (Exception ex)
            {
                LogUtil.Log(ex.Message);
                LogUtil.Log(ex.StackTrace);
            }
        }