Esempio n. 1
0
    public IEnumerator LoadSyndicate()
    {
        if (SyndicateLoaded)
        {
            yield break;
        }
        var pickedMap = additionalSceneList.defaultSyndicateScenes.PickRandom();

        foreach (var syndicateData in additionalSceneList.SyndicateScenes)
        {
            if (syndicateData.DependentScene == null || syndicateData.SyndicateSceneName == null)
            {
                continue;
            }
            if (syndicateData.DependentScene != serverChosenMainStation)
            {
                continue;
            }

            pickedMap = syndicateData.SyndicateSceneName;
            break;
        }
        yield return(StartCoroutine(LoadSubScene(pickedMap)));

        loadedScenesList.Add(new SceneInfo
        {
            SceneName = pickedMap,
            SceneType = SceneType.AdditionalScenes
        });

        PokeClientSubScene.SendToAll(pickedMap);
        yield return(StartCoroutine(RunOnSpawnServer(pickedMap)));

        SyndicateLoaded = true;
    }
    public static void SendToAll(string SceneName)
    {
        var msg = new PokeClientSubScene
        {
            ToLoadSceneName = SceneName
        };

        msg.SendToAll();
    }
    public IEnumerator LoadWizard()
    {
        if (WizardLoaded)
        {
            yield break;
        }

        string pickedScene = additionalSceneList.WizardScenes.PickRandom();

        yield return(StartCoroutine(LoadSubScene(pickedScene)));

        loadedScenesList.Add(new SceneInfo
        {
            SceneName = pickedScene,
            SceneType = SceneType.AdditionalScenes
        });

        PokeClientSubScene.SendToAll(pickedScene);
        WizardLoaded = true;
    }