Ejemplo n.º 1
0
        void SaveTWMapSettings()
        {
            if (twCurCfg == null)
            {
                return;
            }
            twCurCfg.ScoreRequired  = (int)tw_numScoreLimit.Value;
            twCurCfg.ScorePerKill   = (int)tw_numScorePerKill.Value;
            twCurCfg.AssistScore    = (int)tw_numScoreAssists.Value;
            twCurCfg.MultiKillBonus = (int)tw_numMultiKills.Value;
            twCurCfg.Streaks        = tw_cbStreaks.Checked;

            twCurCfg.GracePeriod     = tw_cbGrace.Checked;
            twCurCfg.GracePeriodTime = tw_numGrace.Value;
            twCurCfg.BalanceTeams    = tw_cbBalance.Checked;
            twCurCfg.TeamKills       = tw_cbKills.Checked;
            twCurCfg.Save(twCurMap);

            TWGame game = TWGame.Instance;

            if (game.Running && game.Map.name == twCurMap)
            {
                game.UpdateMapConfig();
            }
        }
Ejemplo n.º 2
0
 static void UpdateConfig(Player p, TWMapConfig cfg)
 {
     cfg.Save(p.level.name);
     if (p.level == TWGame.Instance.Map)
     {
         TWGame.Instance.UpdateMapConfig();
     }
 }
Ejemplo n.º 3
0
        void SaveTWMapSettings()
        {
            if (twCurCfg == null)
            {
                return;
            }
            twCurCfg.ScoreRequired  = (int)tw_numScoreLimit.Value;
            twCurCfg.ScorePerKill   = (int)tw_numScorePerKill.Value;
            twCurCfg.AssistScore    = (int)tw_numScoreAssists.Value;
            twCurCfg.MultiKillBonus = (int)tw_numMultiKills.Value;
            twCurCfg.Streaks        = tw_cbStreaks.Checked;

            twCurCfg.GracePeriod     = tw_cbGrace.Checked;
            twCurCfg.GracePeriodTime = tw_numGrace.Value;
            twCurCfg.BalanceTeams    = tw_cbBalance.Checked;
            twCurCfg.TeamKills       = tw_cbKills.Checked;

            twCurCfg.Save(twCurMap);
            twHelper.UpdateMapConfig(twCurMap);
        }