Example #1
0
        public static void SwitchFromPlay()
        {
            EditorMode = true;
            GameManager.SwitchFromPlay();
            Game1.self.IsMouseVisible = true;
            MasterManager.ChangeSize(EditorSizeX, EditorSizeY);

            MyEditor.OldHeight = 100000;
            MyEditor.OldWidth  = 100000;
            PlayerProfile.Clear();
        }
Example #2
0
        public static void SwitchToPlay()
        {
            LevelFromEditor = true;
            EditorMode      = false;

            EditorSizeX = Game1.self.Window.ClientBounds.Width;
            EditorSizeY = Game1.self.Window.ClientBounds.Height;

            GameManager.SetLevel(new Level(false));

            Stream s = new MemoryStream();

            GameManager.GetEditorLevel().Write(new BinaryWriter(s), false);
            Console.Write(s.Length);
            s.Position = 0;

            GameManager.GetLevel().Read(new BinaryReader(s));

            Game1.self.IsMouseVisible = false;

            //PauseEditor();
            MasterManager.ChangeSize(Game1.ResolutionX, Game1.ResolutionY);
            PlayerProfile.Clear();
        }