Beispiel #1
0
        /// <summary>
        /// Create a scene at the input location
        /// </summary>
        /// <param name="filename">The filename of the scene to be created</param>
        /// <returns>True if successfully created</returns>
        public static bool CreateScene(string filename)
        {
            GameScene gameScene = new GameScene();

            GibboHelper.SerializeObject(filename, gameScene);

            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// Saves the active scene at its location
        /// </summary>
        /// <returns>True if scene is saved</returns>
        public static bool SaveActiveScene()
        {
            if (ActiveScene == null)
            {
                return(false);
            }

            activeScene.SaveComponentValues();
            GibboHelper.SerializeObject(ActiveScenePath, ActiveScene);

            return(true);
        }
Beispiel #3
0
        /// <summary>
        /// Saves the active scene at the input location
        /// </summary>
        /// <param name="path">The target path</param>
        /// <returns></returns>
        public static bool SaveActiveScene(string path, bool xml)
        {
            if (ActiveScene == null)
            {
                return(false);
            }

            activeScene.SaveComponentValues();

            if (!xml)
            {
                GibboHelper.SerializeObject(path, ActiveScene);
            }
            else
            {
                GibboHelper.SerializeObjectXML(path, activeScene);
            }

            return(true);
        }
 internal void Save(string filePath)
 {
     GibboHelper.SerializeObject(filePath, this);
 }
Beispiel #5
0
 /// <summary>
 /// Saves the game object
 /// </summary>
 /// <param name="filename"></param>
 public void Save(string filename)
 {
     GibboHelper.SerializeObject(filename, this);
 }
Beispiel #6
0
        /// <summary>
        /// Saves the project at the current project path location
        /// </summary>
        public void Save()
        {
            this.Settings.SaveToFile();

            GibboHelper.SerializeObject(this.projectFilePath, this);
        }