Esempio n. 1
0
        public static Note ParseSaveString(String saveString)
        {
            if (saveString.StartsWith("[Note]"))
            {
                String subString = saveString.Substring(6);
                String[] split = subString.Split(',');

                double x = double.Parse(split[0]);
                double y = double.Parse(split[1]);
                double xVel = double.Parse(split[2]);
                double yVel = double.Parse(split[3]);

                Note n = new Note(x, y, xVel, yVel, bool.Parse(split[4]));
                return n;
            }

            return null;
        }
Esempio n. 2
0
 /// <summary>
 /// THis method adds a new note to the state.
 /// </summary>
 /// <param name="n">
 /// The note to add.
 /// </param>
 public void AddNote(Note n)
 {
     notes.Add(n);
 }