Example #1
0
    public IEnumerator LoadCore(bool autoStart)
    {
        Application.backgroundLoadingPriority = ThreadPriority.High;
        yield return(SceneManager.LoadSceneAsync(coreSceneName, LoadSceneMode.Single));

        Application.backgroundLoadingPriority = ThreadPriority.Low;

        SceneContainerCore sceneContainer = GetSceneContainer(coreSceneName) as SceneContainerCore;

        if (sceneContainer == null)
        {
            throw new System.Exception("core scene: no SceneContainerCore found!");
        }

        //for all the initialization in Start()
        yield return(null);

        if (!autoStart)
        {
            yield break;
        }

        LoadLocation loader = sceneContainer.loadStartLocation;

        loader.StartItem();
    }
Example #2
0
        /// <summary>
        /// True if this legs matches the handling activity, i.e. the voyage and load location is the same in case of a load activity and so on.
        /// </summary>
        /// <param name="handlingActivity">handling activity</param>
        /// <returns>True if this legs matches the handling activity, i.e. the voyage and load location is the same in case of a load activity and so on.</returns>
        protected internal virtual bool MatchesActivity(HandlingActivity handlingActivity)
        {
            if (Voyage.sameAs(handlingActivity.Voyage))
            {
                if (handlingActivity.Type == HandlingActivityType.LOAD)
                {
                    return(LoadLocation.sameAs(handlingActivity.Location));
                }
                if (handlingActivity.Type == HandlingActivityType.UNLOAD)
                {
                    return(UnloadLocation.sameAs(handlingActivity.Location));
                }
            }

            return(false);
        }
 private void PlaySelectedMission()
 {
     LoadLocation.Execute(FindObjectOfType <SelectedMissionController>().selectedMission.locationData);
 }
Example #4
0
 public void Post([FromBody] LoadLocation location)
 {
     // no op
 }