Пример #1
0
    public IEnumerator Berth(Island island, bool tutorialNow)
    {
        inputManager.StopCurrentInteractions();
        inventory.HandleBerth(true);

        currentIsland = island;
        tutorial      = tutorialNow;

        if (!island.discovered)
        {
            yield return(StartCoroutine(island.Discover(tutorialNow, tutorialManager)));

            yield return(new WaitForSeconds(1));
        }

        islandBackground.GetComponent <SpriteRenderer>().sprite = island.background;
        islandCharacter.GetComponent <SpriteRenderer>().sprite  = island.character;

        currentIslandNumber = island.islandNumber;
        firstVisit          = island.firstTimeVisiting;
        island.Berth();

        EventManager.Instance.Raise(new BlockInputEvent()
        {
            block = true, navigation = false
        });

        globalAnimator.SetTrigger("FirstBerth");
        if (tutorialNow)
        {
            tutorialManager.CompleteStep();
        }
        yield return(new WaitForSeconds(4));

        dialogueManager.StartDialogue(island.dialogue, firstVisit);
    }