public void SaveEmitters(PositionedObjectList <Emitter> emitters, string fileName) { EmitterSaveList emitterSaveList = EmitterSaveList.FromEmitterList(EditorData.Emitters); emitterSaveList.Save(fileName); #if FRB_MDX FlatRedBallServices.Owner.Text = "ParticleEditor - Currently editing " + fileName; #else FlatRedBallServices.Game.Window.Title = "ParticleEditor - Currently editing " + fileName; #endif fileName = FileManager.RemoveExtension(fileName); EditorData.CurrentEmixFileName = fileName; EmitterEditorSettingsSave settings = new EmitterEditorSettingsSave(); settings.Camera = CameraSave.FromCamera(Camera.Main); if (Camera.Main.Orthogonal && Camera.Main.OrthogonalHeight == Camera.Main.DestinationRectangle.Height) { settings.Camera.OrthogonalWidth = -1; settings.Camera.OrthogonalHeight = -1; } settings.Save(FileManager.RemoveExtension(fileName) + ".ess"); }
internal void SaveLastLoaded() { if (string.IsNullOrEmpty(mLastLoaded) || mEmitterSaveList == null) { throw new Exception("There is no loaded Emitter"); } mEmitterSaveList.Save(mLastLoaded); }