//Start of the Utilities Tab public void LoadSaveSpaceArg(string path) { #if DEBUG Log.GetInstence().WriteLine("LoadSaveSpaceArg method was activated."); #endif SaveSpace.LoadSaveSpace(path, euivInstallBar, provinceToCopy, userCopyTo); }
private void PlaceBackGatePressed() { backGatePosition = arCamera.transform.position; SaveSpace.SavePlayerSpace(this); placeBackGateButton.gameObject.SetActive(false); placeBackGateText.gameObject.SetActive(false); sheepSpawnScript.StartSheepHerd(room1Bounds, room2Bounds, connectingRooms, new Vector3(0, 0, 0), new Vector3(0, 0, 0)); }
private void openSaveSpace_Click(object sender, EventArgs e) { #if DEBUG Log.GetInstence().WriteLine("loadSaveSpace method was activated."); #endif DialogResult result = openSaveSpaceDialog.ShowDialog(); if (result == DialogResult.OK) { SaveSpace.LoadSaveSpace(openSaveSpaceDialog.FileName, euivInstallBar, provinceToCopy, userCopyTo); } }
private void universalSaveSpaceButton_Click(object sender, EventArgs e) { #if DEBUG Log.GetInstence().WriteLine("universalSaveSpaceButton method was activated."); #endif DialogResult result = saveSaveSpaceFileDialog.ShowDialog(); if (result == DialogResult.OK) { SaveSpace.CreateSaveSpace(true, saveSaveSpaceFileDialog.FileName, euivInstallBar, provinceToCopy, userCopyTo); } }
private void TranslateAndRotateLoad() { SpaceData data = SaveSpace.LoadPlayerSpace(); Vector3 oldFront = FloatToVector(data.frontGatePosition); Vector3 oldBack = FloatToVector(data.backGatePosition); Vector3 oldDirection = oldBack - oldFront; oldDirection.y = 0; Vector3 newDirection = backGatePosition - frontGatePosition; newDirection.y = 0; float angles = Vector3.SignedAngle(oldDirection, newDirection, Vector3.up); relative = new Vector3(0, angles, 0); pivot = frontGatePosition; Vector3 translation = oldFront - frontGatePosition; translation.y = 0.8f; LoadCenterAndExtents(out room1Bounds, data.room1Center, data.room1Extents, translation, 0); // LoadFences (room1Bounds); LoadCenterAndExtents(out room2Bounds, data.room2Center, data.room2Extents, translation, 2); // LoadFences (room2Bounds); for (int i = 0; i < data.connectingRoomCenters.GetLength(0); i++) { Bounds connectBounds; float[] connectCenter = new float[3]; connectCenter[0] = data.connectingRoomCenters[i, 0]; connectCenter[1] = data.connectingRoomCenters[i, 1]; connectCenter[2] = data.connectingRoomCenters[i, 2]; float[] connectExtent = new float[3]; connectExtent[0] = data.connectingRoomExtents[i, 0]; connectExtent[1] = data.connectingRoomExtents[i, 1]; connectExtent[2] = data.connectingRoomExtents[i, 2]; LoadCenterAndExtents(out connectBounds, connectCenter, connectExtent, translation, 1); // LoadFences (connectBounds); connectingRooms.Add(connectBounds); } TakeOutOverlapingFences(); }