void OnClickStoryItem(HeroStoryListItemContext story)
    {
        Dialog newDialog = Dialog.Create(DialogType.DialogScroll);

        newDialog.SetDialogText(DialogTextType.Title, story.StoryTitle);
        newDialog.SetDialogText(DialogTextType.MainText, story.ContentText);
        newDialog.Show();
    }
Beispiel #2
0
    /// <summary>
    /// ストーリのボタンが押されたとき
    /// </summary>
    /// <param name="story"></param>
    void OnClickStoryItem(HeroStoryListItemContext story)
    {
        SoundUtil.PlaySE(SEID.SE_MENU_OK);

        Dialog newDialog = Dialog.Create(DialogType.DialogScroll);

        newDialog.SetDialogText(DialogTextType.Title, story.StoryTitle);
        newDialog.SetDialogText(DialogTextType.MainText, story.ContentText);
        newDialog.Show();
    }
Beispiel #3
0
    public void SetStory(HeroStoryListItemContext storyItem, uint hero_id)
    {
        string title = "";
        string text  = "";

        switch (hero_id)
        {
        case 1:
            title = GameTextUtil.GetText("kazushi_story_title");
            text  = GameTextUtil.GetText("kazushi_story_text");
            break;

        case 2:
            title = GameTextUtil.GetText("kokoro_story_title");
            text  = GameTextUtil.GetText("kokoro_story_text");
            break;

        case 3:
            title = GameTextUtil.GetText("sinnku_story_title");
            text  = GameTextUtil.GetText("sinnku_story_text");
            break;

        case 4:
            title = GameTextUtil.GetText("rian_story_title");
            text  = GameTextUtil.GetText("rian_story_text");
            break;

        case 5:
            title = GameTextUtil.GetText("musashi_story_title");
            text  = GameTextUtil.GetText("musashi_story_text");
            break;

        case 6:
            title = GameTextUtil.GetText("lounie_story_title");
            text  = GameTextUtil.GetText("lounie_story_text");
            break;

        default:
            break;
        }

        storyItem.ButtonText  = storyItem.StoryTitle = title;
        storyItem.ContentText = text;
    }
Beispiel #4
0
    public void SetDetail(PacketStructHero heroData, Action <HeroStoryListItemContext> _OnClickStoryItem)
    {
        ClearView();
        if (heroData == null || heroData.hero_id == 0)
        {
            return;
        }
        MasterDataHero heroMaster = MasterFinder <MasterDataHero> .Instance.Find((int)heroData.hero_id);

        if (heroMaster == null)
        {
            return;
        }

        SetUpHeroName(heroData.hero_id); // 名前
        MessageText = heroMaster.detail; // 詳細テキスト

        AssetBundler.Create().Set("hero_" + heroData.hero_id.ToString("0000"), "hero_" + heroData.hero_id.ToString("0000"), (o) =>
        {
            Sprite[] sprite = o.AssetBundle.LoadAssetWithSubAssets <Sprite>("hero_" + heroData.hero_id.ToString("0000"));
            HeroImage       = sprite[4];
        }).Load();
        //------------------------------------------------------------------
        // グレードの設定
        //------------------------------------------------------------------
        m_GradeNum = heroData.level;

        MasterDataHeroLevel nextHeroLevelMaster = MasterFinder <MasterDataHeroLevel> .Instance.Find((int)heroData.level + 1);

        if (nextHeroLevelMaster != null)
        {
            m_NextGradeNum = nextHeroLevelMaster.exp_next_total - heroData.exp;
        }
        else
        {
            m_NextGradeNum = 0;
        }

        //------------------------------------------------------------------
        // イラストレーター名
        //------------------------------------------------------------------
        MasterDataIllustrator illustratorMaster = MasterFinder <MasterDataIllustrator> .Instance.Find((int)heroMaster.illustrator_id);

        if (illustratorMaster != null)
        {
            IllustratorText = illustratorMaster.name;
        }

        //------------------------------------------------------------------
        // スキルの設定
        //------------------------------------------------------------------
        List <UnitSkillContext> skillList = new List <UnitSkillContext>();
        UnitSkillContext        skill     = new UnitSkillContext();

        skill.setupHeroSkill((uint)heroMaster.default_skill_id, heroData.hero_id, m_GradeNum, true);
        skillList.Add(skill);
        Skills = skillList;

        //------------------------------------------------------------------
        // ストーリの設定
        //------------------------------------------------------------------
        List <HeroStoryListItemContext> storyList = new List <HeroStoryListItemContext>();

        for (int i = 0; i < 4; ++i)
        {
            var model = new ListItemModel((uint)i);
            HeroStoryListItemContext story = new HeroStoryListItemContext(model);
            story.StoryTitle = "";
            storyList.Add(story);

            model.OnClicked += () =>
            {
                _OnClickStoryItem(story);
            };

            // TODO : 演出を入れるならそこに移動
            model.Appear();
            model.SkipAppearing();
        }

        SetStory(storyList[0], (uint)heroData.hero_id);
        storyList[1].ContentText = "";
        storyList[2].ContentText = "";
        storyList[3].ContentText = "";

        storyList[0].IsOpenStory = true;

        Stories = storyList;
    }