public void LevelLoad(string filepath) { SceneStop(); SetTool(null); EditorScene load = Serializer.Deserialize(filepath); load.ActiveCamera.Controller = this; load.ActiveCamera.InputExt = Input; Renderer.AddLayer(load); Renderer.RemoveLayer(Level); Level = load; selection = new Selection(Level); LevelLoaded(this, filepath); LevelChanged(this, filepath); TimeChanged(this, Level.Time); }
public void LevelCreate() { //SceneStop(); SetTool(null); Renderer.RemoveLayer(Hud); Renderer.RemoveLayer(Level); Hud = new Scene(); Level = new EditorScene(Renderer); Renderer.AddLayer(Level); Renderer.AddLayer(Hud); selection = new Selection(Level); StateList = new StateList(); CamControl = new ControllerCamera(this, Input, Level); Transform2.SetSize(CamControl, 10); Hud.SetActiveCamera(CamControl); Level.ActiveCamera = CamControl; LevelCreated(this, null); LevelChanged(this, null); TimeChanged(this, Level.Time); }