public void Draw(Canvas canvas) { foreach (IUpdateable up in updateables) { up.Update(); } canvas.SetClearColor(BackgroundColor); canvas.Clear(); foreach (IDrawable drawable in drawables) { drawable.Draw(canvas); } canvas.Present(); }
private void Init() { CursorHandler.SetMainForm(this); GameApp.Init(); TextRenderer.Init(); objectsTree.Nodes.Add(GameApp.GetTreeNode()); GameApp.OnTreeNodeAdd(); pbDraw.Init(); canvas = pbDraw.GetCanvas(); canvas.SetClearColor(Color.Black); PropPanelLoader.SetMainPropPanel(propPanel); TextureFactory.SetDevicePtr(canvas.GetDevice()); GameApp.ShowPropsPanel(); ToolManager.SetCurrentTool(new InteractionTool()); fpsCounter = new System.Diagnostics.Stopwatch(); }