예제 #1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.S) && Input.GetKey(KeyCode.LeftAlt) && Singleton.playerTank)
     {
         path = Path.GetFullPath(Path.Combine(AdvancedBuildingMod.PreciseSnapshotsFolder, Singleton.playerTank.name + ".json"));
         if (File.Exists(path))
         {
             visible = true;
             return;
         }
         PreciseSnapshot.Save(Singleton.playerTank, AdvancedBuildingMod.PreciseSnapshotsFolder);
     }
 }
예제 #2
0
 private void DoWindow(int id)
 {
     GUILayout.Label(new GUIContent("<color=yellow>WARNING</color>"), new GUIStyle {
         richText = true, alignment = TextAnchor.MiddleCenter, fontSize = 32
     });
     GUILayout.Label("The path \"" + path + "\" already exists.\n Do you want to replace it ?");
     GUILayout.BeginHorizontal();
     if (GUILayout.Button("Cancel"))
     {
         visible = false;
     }
     if (GUILayout.Button("Overwrite"))
     {
         visible = false;
         PreciseSnapshot.Save(Singleton.playerTank, AdvancedBuildingMod.PreciseSnapshotsFolder);
     }
     GUILayout.EndHorizontal();
 }