public UIManager(SonicManager sonicManager, CanvasRenderingContext2D mainCanvas) { Instance = this; mainCanvas.Font = TextFont; UIAreas = new List<UIArea>(); this.sonicManager = sonicManager; this.mainCanvas = mainCanvas; dragger = new Dragger((xsp, ysp) => { sonicManager.WindowLocation.X += (int) xsp; sonicManager.WindowLocation.Y += (int) ysp; sonicManager.BigWindowLocation.X = sonicManager.WindowLocation.X; sonicManager.BigWindowLocation.Y = sonicManager.WindowLocation.Y; }); UIManagerAreas = new UIManagerAreas(); // new LevelSelectorArea(this); new ColorEditorArea(this); // new ObjectFrameworkArea(this); // new ObjectFrameworkListArea(this); var l = new LevelManagerArea(this); l.LevelManager.Visible = false; sonicManager.OnLevelLoad += (level) => { l.LevelManager.Visible = true; // new TileChunkArea(this); }; }
public ObjectManager(SonicManager sonicManager) { this.sonicManager = sonicManager; }