示例#1
0
 protected override Level Deserialize(string text) => LevelExporter.FromCSharp(text);
示例#2
0
 protected override string Serialize(Level level) => LevelExporter.ToCSharp(level);
示例#3
0
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     this.IsMouseVisible = true;
     objects = new LinkedList<WorldObject>();
     highlightRect = new Rectangle(-100, -100, 80, 30);
     palette = new Rectangle(0, 0, SCREEN_WIDTH - 200, SCREEN_HEIGHT);
     gridRect = new Rectangle(0, 0, 10, 10);
     backgroundRect = new Rectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
     menuOpenRect = new Rectangle(0,0,100,70);
     menu = new Menu();
     levelExport = new LevelExporter();
     saveFile = false;
     openFile = false;
     showBounds = false;
     keyDown = false;
     addPlatform = addEnemy = addDoodad = addItem = addHazardousPlatform = addStart = addGoal = addRope = false;
     openMenu = false;
     oldScrollValue = 0;
     newScrollValue = 0;
     xAdd = 0;
     graphics.PreferredBackBufferWidth = SCREEN_WIDTH;
     graphics.PreferredBackBufferHeight = SCREEN_HEIGHT;
     graphics.ApplyChanges();
     zoom_scale = 1;
     base.Initialize();
 }