示例#1
0
        private void GoForLaunch()
        {
            MyRocketToLaunchpadHook myRocketToLaunchpadHook = MyHookSystem.executeHook <MyRocketToLaunchpadHook>(new MyRocketToLaunchpadHook(this.buildGrid.parts));
            bool flag = myRocketToLaunchpadHook.isCanceled();

            if (!flag)
            {
                string jsonString = JsonUtility.ToJson(new Build.BuildSave("To Launch", Ref.cam.transform.position, myRocketToLaunchpadHook.rocket, this.GetOrientation()));
                Ref.SaveJsonString(jsonString, Saving.SaveKey.ToLaunch);
                Ref.LoadScene(Ref.SceneType.Game);
            }
        }
示例#2
0
        private void GoForLaunch()
        {
            MyRocketToLaunchpadHook res = MyHookSystem.executeHook <MyRocketToLaunchpadHook>(new MyRocketToLaunchpadHook());

            if (res.isCanceled())
            {
                return;
            }
            string jsonString = JsonUtility.ToJson(new Build.BuildSave("To Launch", Ref.cam.transform.position, this.buildGrid.parts));

            Ref.SaveJsonString(jsonString, Saving.SaveKey.ToLaunch);
            Ref.LoadScene(Ref.SceneType.Game);
        }