public static void InitConfig(Proto.SomeConfig config) { refreshMyRankCost = config.refreshMyRankCost; createGameHourPer = config.createGameHourPer; createGameDiamondPer = config.createGameDiamondPer; douziGetPercent = config.douziGetPercent; notice = config.notice; gameTimeDiff = config.gameTimeDiff; gameTypes.Clear(); foreach (var one in config.gameTypes) { gameTypes[one.type] = one; } gameParamName.Clear(); foreach (var one in config.gameParamName) { gameParamName[one.type] = one.name; } rollNotices = config.rollNotices; rollNoticeI = 0; rollNoticeX = 0; sendRollNoticeCost = config.sendRollNoticeCost; }
void SVR_GetConfigBack(string msg) { Debug.Log(msg); Proto.SomeConfig data = JsonUtility.FromJson <Proto.SomeConfig>(msg); PlayerInfo.InitConfig(data); }