Ejemplo n.º 1
0
        public static void MakeNewScene()
        {
            EditorWindow.LastInstance.Text = "SpriteEditor - untitled scene";

            SpriteManager.RemoveSpriteList(GameData.Scene.Sprites);

            FlatRedBallServices.Unload(GameData.SceneContentManager);

            GameData.Scene.RemoveFromManagers();

            GameData.Scene.SpriteGrids.Clear();
            SESpriteGridManager.CurrentSpriteGrid  = null;
            sesgMan.SpriteGridGrabbed              = null;
            sesgMan.newlySelectedCurrentSprite     = null;
            sesgMan.newlySelectedCurrentSpriteGrid = null;
            SESpriteGridManager.oldPosition        = Vector3.Empty;
            sesgMan.ClickGrid(null, null);


            GameData.DeselectCurrentSpriteFrames();

            GuiData.ListWindow.ClearTextures();
            mReferencedAnimationChains.Clear();

            FlatRedBallServices.Unload(GameData.SceneContentManager);

            GuiData.ToolsWindow.SnapSprite.Unpress();
            GameData.EditorProperties.ConstrainDimensions = false;
            GameData.EditorProperties.PixelSize           = 0f;
            GameData.EditorProperties.SnapToGrid          = false;

            Camera.X = 0f;
            Camera.Y = 0f;
            Camera.Z = -40f;
            GameData.EditorLogic.EditAxes.Visible = false;

            if (mShapeCollection != null)
            {
                mShapeCollection.RemoveFromManagers();
                mShapeCollection = null;
            }

            mProperties = new SpriteEditorSceneProperties();
        }
Ejemplo n.º 2
0
        public static void LoadShapeCollection(string fileName)
        {
            bool replace = true;

            if (replace)
            {
                mShapeCollection.RemoveFromManagers();
                mShapeCollection.Clear();

                mShapeCollection =
                    FlatRedBallServices.Load <ShapeCollection>(fileName, ContentManagerName);
                mShapeCollection.AddToManagers();

                LastLoadedFile = fileName;
            }
        }