コード例 #1
0
ファイル: Engine.cs プロジェクト: luizfilipe/MonoGame-Samples
        private void GameOver()
        {
            if (score.Value > score.RecordScore)
            {
                score.RecordScore = score.Value;

                pause = true;

                Record record = new Record();
                //record.ShowDialog ();

                score.RecordPlayer = record.Player;

                using (StreamWriter writer = File.CreateText("record.dat")) {
                    writer.WriteLine(score.RecordPlayer);
                    writer.WriteLine(score.RecordScore);
                }

                pause = false;
            }
            board.Initialize();
            score.Initialize();
        }
コード例 #2
0
ファイル: Engine.cs プロジェクト: vs-team/casanova-mk2
        private void GameOver()
        {
            if (score.Value > score.RecordScore)
            {
                score.RecordScore = score.Value;

                pause = true;

                Record record = new Record();
                record.ShowDialog();

                score.RecordPlayer = record.Player;

                using (StreamWriter writer = File.CreateText("record.dat"))
                {
                    writer.WriteLine(score.RecordPlayer);
                    writer.WriteLine(score.RecordScore);
                }

                pause = false;
            }
            board.Initialize();
            score.Initialize();
        }