Пример #1
0
    public static void Play_Shop(Character shopCharacter)
    {
        if (GameData.state == GameData.State.HealerJoined)
        {
            Window_QuestPointer.DestroyPointer(GameAssets.i.Map.Find("shop").position);
            GameData.state = GameData.State.LeavingTown;
            Window_QuestPointer.Create(GameAssets.i.Map.Find("letsLeaveTown").position, Color.white, Color.white);
        }


        UIBlack.Show();
        OvermapHandler.StopOvermapRunning();
        Dialogue dialogue = Dialogue.GetInstance();

        dialogue.SetDialogueActions(new List <Action>()
        {
            () => {
                dialogue.Show();
                dialogue.ShowLeftCharacter(GameAssets.i.s_PlayerDialogueSprite, true);
                dialogue.ShowLeftCharacterName(GameData.GetCharacterName(Character.Type.Player));
                dialogue.HideLeftText();
                dialogue.ShowRightCharacter(GameAssets.i.s_VendorPortrait, false);
                dialogue.ShowRightCharacterName(GameData.GetCharacterName(Character.Type.Shop));
                dialogue.ShowRightText("Greetings! Care to browse my wares?");
            },
            () => {
                dialogue.Hide();

                Window_Shop.Show_Static(shopCharacter.shopContents, () => {
                    UIBlack.Hide();
                    OvermapHandler.StartOvermapRunning();
                });
            },
        }, true);
    }