コード例 #1
0
 private void OnDestroy()
 {
     if (Instance != null)
     {
         if (Instance == this)
         {
             Instance = null;
         }
     }
     InputLockManager.RemoveControlLock("BeenThereDoneThatQuickLaunchMissionDialog");
     FlightDriver.SetPause(false, true);
 }
コード例 #2
0
        public static QuickLaunchMissionDialog Create(Callback onDismissCallback, QuickLaunchVessel quickLaunchVessel, Vessel vessel)
        {
            GameObject gameObject = new GameObject("BeenThereDoneThat mission start menu");
            QuickLaunchMissionDialog quickLaunchMissionDialog = gameObject.AddComponent <QuickLaunchMissionDialog>();

            quickLaunchMissionDialog.onDismissCallback = onDismissCallback;
            quickLaunchMissionDialog.skin = UISkinManager.GetSkin("MainMenuSkin");
            quickLaunchMissionDialog.quickLaunchVessel    = quickLaunchVessel;
            quickLaunchMissionDialog.vessel               = vessel;
            quickLaunchMissionDialog.selectedMissionIndex = -1;

            return(quickLaunchMissionDialog);
        }
コード例 #3
0
        public void OnQuickLaunchMission(Vessel vessel)
        {
            LaunchVehicle launchVehicle = null;
            Payload       payload       = null;

            if (!QuickLauncher.Instance.Split(vessel.parts, out launchVehicle, out payload))
            {
                ScreenMessages.PostScreenMessage("No payload separator available", 4, ScreenMessageStyle.UPPER_CENTER);
                return;
            }

            int key = launchVehicle.GetHashCode();

            if (!quickLaunchVessels.ContainsKey(key))
            {
                ScreenMessages.PostScreenMessage("No missions available", 4, ScreenMessageStyle.UPPER_CENTER);
                return;
            }

            QuickLaunchVessel quickLaunchVessel = quickLaunchVessels[key];

            quickLaunchMissionDialog = QuickLaunchMissionDialog.Create(OnQuickLaunchDialogDismissed, quickLaunchVessel, vessel);
        }
コード例 #4
0
 public void Awake()
 {
     Instance = this;
     FlightDriver.SetPause(true, true);
     InputLockManager.SetControlLock("BeenThereDoneThatQuickLaunchMissionDialog");
 }
コード例 #5
0
 public void OnQuickLaunchDialogDismissed()
 {
     quickLaunchMissionDialog = null;
 }