コード例 #1
0
        /// <summary>
        /// Unity event.
        /// </summary>
        private void Start()
        {
            GameplayState gameplayState = SceneManager.Instance.GameplayState;

            RoomSelectable = gameplayState.Room.GetComponent <Selectable>();

            InvoiceData.ClearData();

            Mission mission = null;

            if (GameplayState.MissionToLoad == ModMission.CUSTOM_MISSION_ID)
            {
                mission = GameplayState.CustomMission;
            }
            else
            {
                mission = MissionManager.Instance.GetMission(GameplayState.MissionToLoad);
            }

            InvoiceData.MissionName = mission?.DisplayName;

            if (string.IsNullOrEmpty(InvoiceData.MissionName))
            {
                InvoiceData.MissionName = "Free Play";
            }

            FactoryGameModePicker.GameMode gameModeEnum;
            GameMode             = FactoryGameModePicker.CreateGameMode(GameplayState.MissionToLoad, gameObject, out gameModeEnum);
            InvoiceData.GameMode = gameModeEnum;

            QuickDelay(() => GameMode.Setup(this));

            OnLightChange(false);
        }
コード例 #2
0
        /// <summary>
        /// Unity event.
        /// </summary>
        private void Start()
        {
            GameplayState gameplayState = SceneManager.Instance.GameplayState;

            RoomSelectable = gameplayState.Room.GetComponent <Selectable>();

            InvoiceData.ClearData();

            Mission mission = gameplayState.Mission;

            InvoiceData.MissionName = mission != null?Localization.GetLocalizedString(mission.DisplayNameTerm != "Freeplay"?mission.DisplayNameTerm : "Missions/freeplay_DisplayName") : null;

            FactoryGameModePicker.GameMode gameModeEnum;
            GameMode             = FactoryGameModePicker.CreateGameMode(GameplayState.MissionToLoad, gameObject, out gameModeEnum);
            InvoiceData.GameMode = gameModeEnum;

            QuickDelay(() => GameMode.Setup(this));

            OnLightChange(false);

            KMModSettings modSettings       = GetComponent <KMModSettings>();
            ModSettings   activeModSettings = JsonConvert.DeserializeObject <ModSettings>(modSettings.Settings);

            GetComponent <SpoopyScares>().enabled = activeModSettings.halloweenEvent;
        }