public override void Activate(bool instancePreserved) { base.Activate(instancePreserved); AxiosTitleFile file = new AxiosTitleFile("Levels/level" + level.ToString() + ".xml.gz"); GZipStream zipstream = new GZipStream(file.GetStream(FileMode.Open), CompressionMode.Decompress); Level = Level.FromStream(zipstream, this); World.Gravity = new Vector2(0, 10f); }
public void LoadLevelFromGZFile(string s) { AxiosTitleFile file = new AxiosTitleFile(s); GZipStream zipstream = new GZipStream(file.GetStream(FileMode.Open), CompressionMode.Decompress); this.LoadLevelFromStream(zipstream); }
public void LoadLevelFromFile(string s) { AxiosTitleFile file = new AxiosTitleFile(s); this.LoadLevelFromStream(file.GetStream(FileMode.Open)); }