Exemplo n.º 1
0
 private void onLevelWasLoaded(GameScenes scene)
 {
     if (scene != GameScenes.SPACECENTER || activeVessel < 0)
     {
         return;
     }
     AutoLoadGame.Log("SPACECENTER is loaded. Waiting 60 frames and switching to the active vessel.");
     StartCoroutine(CallbackUtil.DelayedCallback(60, switch_to_active_vessel));
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
         return;
     }
     GameEvents.onLevelWasLoadedGUIReady.Add(onLevelWasLoaded);
     DontDestroyOnLoad(this);
     instance = this;
     savesDir = Path.Combine(KSPUtil.ApplicationRootPath, "saves");
     config   = Path.Combine(savesDir, "AutoLoadGame.conf");
 }