-
Notifications
You must be signed in to change notification settings - Fork 7
Levels
Andrey edited this page Sep 21, 2023
·
8 revisions
There is a class Level that contains everything related to the editor.
Such as colors, blocks, background, guidelines and others
var local = await LocalLevels.LoadFileAsync();
var level = local.GetLevel("MyLevel", revision: 0).LoadLevel();revision is the number for levels with the same names.
In the game, it's written as "rev."
var response = await client.DownloadLevelAsync(id: 49395494);
if (response.GeometryDashStatusCode != 0)
throw new InvalidOperationException($"server return an error: {response.GeometryDashStatusCode}");
var levelString = response.GetResultOrDefault()?.Level?.LevelString;
if (string.IsNullOrEmpty(levelString))
throw new InvalidOperationException("malformed level string");
var level = new Level(levelString, compressed: true);var level = new Level();