public void LoadSpace(int saveSel){ FileStream myFile; BinaryFormatter bf = new BinaryFormatter (); string destination = Application.persistentDataPath + controlSingle.Instance.GetCurSaveFolderName () + "\\" + "save" + controlSingle.Instance.GetLevelSeekLoc() + ".dat"; if (File.Exists (destination)) { myFile = File.OpenWrite (destination); } else { myFile = File.Create (destination); } curSpace = (placementSpace) bf.Deserialize(myFile); List<placementObject> spaceObjects = curSpace.GetObjects (); controlSingle.Instance.SetScreenOffset(curSpace.GetScreenOffset()); controlSingle.Instance.SetScreenSize (curSpace.GetScreenSize()); controlSingle.Instance.SetScreenZoom(new Vector2( Mathf.Min(controlSingle.Instance.GetDefaultZoom().x, curSpace.GetScreenSize().x), Mathf.Min(controlSingle.Instance.GetDefaultZoom().y, curSpace.GetScreenSize().y))); // Must reform to a proper resolution !!!!!!!!!!! myFile.Close (); }
public void SetScreenSpace(placementSpace newSpace) { mySpace = newSpace; }
public void StartFreePlay(Vector3 myScreenSpace){ curSpace = new placementSpace(null, null, myScreenSpace, Vector3.zero, 0); }