Beispiel #1
0
        /// <summary>
        /// save settings to file
        /// сохранить настройки в файл
        /// </summary>
        public void Save()
        {
            MovingShadowBody.Save();
            MovingUp.Save();
            MovingDown.Save();
            try
            {
                if (string.IsNullOrWhiteSpace(Name))
                {
                    return;
                }

                using (StreamWriter writer = new StreamWriter(@"Engine\" + Name + @".txt", false))
                {
                    writer.WriteLine(ColorUp.ToArgb());
                    writer.WriteLine(ColorDown.ToArgb());
                    writer.WriteLine(PaintOn);
                    writer.WriteLine(Deviation);
                    writer.WriteLine(MaLenth);
                    writer.Close();
                }
            }
            catch (Exception)
            {
                // send to log
                // отправить в лог
            }
        }
Beispiel #2
0
 /// <summary>
 /// delete file with settings
 /// удалить файл с настройками
 /// </summary>
 public void Delete()
 {
     if (File.Exists(@"Engine\" + Name + @".txt"))
     {
         File.Delete(@"Engine\" + Name + @".txt");
     }
     MovingShadowBody.Delete();
     MovingUp.Delete();
     MovingDown.Delete();
 }
    public void OnMovingDownMenuReady()
    {
        musicPlayer.Play();
        if (previousLevelResult == null)
        {
            previousLevelResult         = new LevelResult();
            previousLevelResult.waveNum = 1;
        }

        MovingDown movingDown = (MovingDown)FindNode("MovingDown", true, false);

        movingDown.OnLevelCompleted(previousLevelResult, this);
    }