Exemple #1
0
    public async Task DoMenuAsync(RecruitSelectionData data, bool autoclose = true)
    {
        Populate(data);
        while (true)
        {
            var slot = await recruitSelector.SelectItemAsync(null, true);

            if (slot >= data.options.Length)
            {
                await ShowInfo();
            }
            else
            {
                var recruited = await RecruitAndNameAsync(data.options[slot]);

                if (recruited)
                {
                    break;
                }
            }
        }
        if (autoclose)
        {
            await CloseRoutine();
        }
    }
Exemple #2
0
    private async Task RecruitAsync(RecruitSelectionData data)
    {
        var menu        = RecruitMenu.ShowDefault();
        var recruitTask = menu.DoMenuAsync(data, autoclose: false);
        await fade.FadeInRoutine("black");

        await recruitTask;
        await fade.FadeOutRoutine("black");

        await menu.CloseRoutine();
    }
Exemple #3
0
    public void Populate(RecruitSelectionData data)
    {
        this.data           = data;
        recruitSummary.text = data.title;
        var modifiedOptions = new List <CharaData>(data.options)
        {
            null // the "more info" cell hack
        };

        recruitCells.Populate(modifiedOptions, (obj, chara) => {
            obj.GetComponent <RecruitCellView>().Populate(chara);
        });
    }