/// <summary> /// Called when the Application is loaded /// </summary> /// <param name="e">Event arguments</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // We need this for the editor, TODO: Find a better way for this ConverterLoader.Load(); Logger.OnLoad(e); Logger.Log(LogLevel.DEBUG, "CoreApplication:OnLoad(e)"); InputManager.OnLoad(e); }
internal void OnLoad(EventArgs e) { ConverterLoader.Load(); Redraw(); AssemblyName[] names = Assembly.GetExecutingAssembly().GetReferencedAssemblies(); foreach (AssemblyName assem in names) { Assembly a = Assembly.Load(assem); IEnumerable <Type> classes = from t in a.GetTypes() where t.IsClass select t; foreach (Type elem in classes) { if (elem.BaseType != null && elem.BaseType.Name == "CoreComponent") { ComponentSelectorObject o = new ComponentSelectorObject(); o.name = elem.Name; o.fullname = elem.FullName; componentList.Add(o); //this.AddComponentSelectionBox.Items.Add(new CoreEngine.Engine.Rendering.Camera()); } } } _hierarchyTreeView = Program.editor.GetHierarchy(); _inspectorComponentPanel = Program.editor.GetInspector(); _inspectorTransformGrid = Program.editor.GetInspectorTransformGrid(); _inspectorTransformGrid.Visible = false; sceneManager = new SceneManager(); currentScene = new Scene(); SceneManager.CurrentScene = currentScene; CreateCameraGameObject(); GL.Enable(EnableCap.DepthTest); }