void SaveLSMapSettings() { if (lsCurCfg == null) { return; } lsCurCfg.KillerChance = (int)ls_numKiller.Value; lsCurCfg.FastChance = (int)ls_numFast.Value; lsCurCfg.WaterChance = (int)ls_numWater.Value; lsCurCfg.DestroyChance = (int)ls_numDestroy.Value; lsCurCfg.LayerChance = (int)ls_numLayer.Value; lsCurCfg.LayerCount = (int)ls_numCount.Value; lsCurCfg.LayerHeight = (int)ls_numHeight.Value; lsCurCfg.RoundTime = ls_numRound.Value; lsCurCfg.FloodTime = ls_numFlood.Value; lsCurCfg.LayerInterval = ls_numLayerTime.Value; lsCurCfg.Save(lsCurMap); LSGame game = LSGame.Instance; if (game.Running && game.Map.name == lsCurMap) { game.UpdateMapConfig(); } }
static void UpdateConfig(Player p, LSMapConfig cfg) { cfg.Save(p.level.name); if (p.level == LSGame.Instance.Map) { LSGame.Instance.UpdateMapConfig(); } }
void SaveLSMapSettings() { if (lsCurCfg == null) { return; } lsCurCfg.KillerChance = (int)ls_numKiller.Value; lsCurCfg.FastChance = (int)ls_numFast.Value; lsCurCfg.WaterChance = (int)ls_numWater.Value; lsCurCfg.DestroyChance = (int)ls_numDestroy.Value; lsCurCfg.LayerChance = (int)ls_numLayer.Value; lsCurCfg.LayerCount = (int)ls_numCount.Value; lsCurCfg.LayerHeight = (int)ls_numHeight.Value; lsCurCfg.RoundTime = ls_numRound.Value; lsCurCfg.FloodTime = ls_numFlood.Value; lsCurCfg.LayerInterval = ls_numLayerTime.Value; lsCurCfg.Save(lsCurMap); lsHelper.UpdateMapConfig(lsCurMap); }