コード例 #1
0
        /// <summary>
        /// Save the state of the display
        /// </summary>
        /// <returns></returns>
        public DisplaySave Save()
        {
            // make new save object
            DisplaySave save = new DisplaySave();

            // set fields
            save.displayObjects = displayObjects;
            save.center = transform.CenterPoint;
            save.scale = transform.Scale;
            save.DisplayGrid = DisplayGrid;

            // return save
            return save;
        }
コード例 #2
0
 /// <summary>
 /// Loads the display from a save point
 /// </summary>
 /// <param name="save"></param>
 public void LoadSave(DisplaySave save)
 {
     // set fields
     displayObjects = save.displayObjects;
     transform.CenterPoint = save.center;
     transform.Scale = save.scale;
     DisplayGrid = save.DisplayGrid;
 }