Ejemplo n.º 1
0
 public static void CreateNewLevel()
 {
     CurrentLevel = new LevelData();
     HasSaved = false;
     tempRectangle = PhysicsRectangle.Empty;
     startPoint = new StartPoint(new Vector2(0, 0));
 }
Ejemplo n.º 2
0
        public static void LoadLevel(string path)
        {
            string json;
            StreamReader reader = new StreamReader(path);
            CurrentPath = path;
            using (reader)
            {
                json = reader.ReadToEnd();
            }

            CurrentLevel = JsonConvert.DeserializeObject<LevelData>(json);
            HasSaved = true;
            startPoint = new StartPoint(CurrentLevel.StartPosition);
        }