public void SetUpParamChara(int index) { //-------------------------------- // アクセス番号決定 //-------------------------------- if (index >= m_CharaMasterArray.Length) { index = 0; } if (index < 0) { index = m_CharaMasterArray.Length - 1; } MasterDataParamChara charaMaster = m_CharaMasterArray[index]; m_CurrentCharaMaster = charaMaster; m_Index = index; NameText = charaMaster.name; m_IdInputField.text = charaMaster.fix_id.ToString(); m_NoInputField.text = charaMaster.draw_id.ToString(); m_QuestDetailBG.setupChara(charaMaster.fix_id); StartCoroutine(m_QuestDetailBG.LoopCheckBossImageLoad(() => { })); }
protected override void Start() { base.Start(); questDetailBG.QuestId = 1; questDetailBG.QuestIdLabel = "Quest."; questDetailBG.QuestTitle = "サンプルクエスト名"; questDetailBG.AreaCategoryTitle = "エリアカテゴリ名"; questDetailBG.AreaTitle = "エリア名"; questDetailBG.ButtonTitle = "出撃"; questDetailBG.setupChara(charaId); questDetailInfo.CountLabel = "BATTLE"; questDetailInfo.CountValue = "5"; questDetailInfo.ExpLabel = "EXP"; questDetailInfo.ExpValue = "2000"; questDetailInfo.CoinLabel = "COIN"; questDetailInfo.CoinValue = "1500"; questDetailInfo.BossLabel = "BOSS"; questDetailInfo.BossName = "ぼすのなまえ"; //Sprite _tmpSprite = Resources.Load<Sprite>("UIData/element/s_hi"); questDetailTab.DidTabChenged = ChengeTab; for (int i = 0; i < 3; i++) { questDetailTab.AddTab("タブ" + (i + 1).ToString(), (QuestDetailModel.TabType)i); } questDetailMessage.Title = "タイトルだよ"; questDetailMessage.Message = "さんぷるめっせーじだよ"; UnityUtil.SetObjectEnabledOnce(questDetailMessage.gameObject, false); questDetailMission.Title = "MISSION"; questDetailMission.Count = 0; questDetailMission.CountMax = 5; for (int i = 0; i < 5; i++) { QuestMissionContext newMission = new QuestMissionContext(); newMission.Title = "ミッションタイトル" + (i + 1).ToString(); newMission.Count = i; newMission.CountMax = 4; newMission.IconImage = null; newMission.IsActiveLeftTime = true; newMission.LeftValue = "あと" + (i + 1).ToString() + "日"; questDetailMission.MissionList.Add(newMission); } UnityUtil.SetObjectEnabledOnce(questDetailMission.gameObject, false); }
private void updateQuest2Detail() { if (m_QuestDetailBG != null) { //情報 m_QuestDetailBG.QuestId = 1; m_QuestDetailBG.QuestIdLabel = "Quest."; m_QuestDetailBG.QuestTitle = m_MasterDataQuest2.quest_name; m_QuestDetailBG.AreaCategoryTitle = m_MasterDataAreaCategory.area_cate_name; m_QuestDetailBG.AreaTitle = m_MasterDataArea.area_name; m_QuestDetailBG.ButtonTitle = GameTextUtil.GetText("questinfo_button"); m_QuestDetailBG.DidSelectButton = OnSelectButton; UnitIconImageProvider.Instance.Get( m_MasterDataQuest2.boss_chara_id, sprite => { m_QuestDetailBG.BossImage = sprite; }); MasterDataParamChara _master = MasterFinder <MasterDataParamChara> .Instance.Find((int)m_MasterDataQuest2.boss_chara_id); m_QuestDetailBG.IconSelect = MainMenuUtil.GetElementCircleSprite(_master.element); m_QuestDetailBG.setupChara(m_MasterDataQuest2.boss_chara_id); } MasterDataParamChara _masterBoss = MasterFinder <MasterDataParamChara> .Instance.Find((int)m_MasterDataQuest2.boss_chara_id); if (m_QuestDetailInfo != null && _masterBoss != null) { //詳細情報 m_QuestDetailInfo.CountLabel = GameTextUtil.GetText("questinfo_text1"); m_QuestDetailInfo.CountValue = string.Format(GameTextUtil.GetText("value_colorset"), m_MasterDataQuest2.battle_count); m_QuestDetailInfo.ExpLabel = GameTextUtil.GetText("questinfo_text3"); m_QuestDetailInfo.CoinLabel = GameTextUtil.GetText("questinfo_text4"); m_QuestDetailInfo.BossLabel = GameTextUtil.GetText("questinfo_text2"); m_QuestDetailInfo.BossName = _masterBoss.name; { //詳細情報テキスト差し替え MasterDataQuestAppearance[] questAppearance = MasterFinder <MasterDataQuestAppearance> .Instance.SelectWhere("where area_category_id = ?", MainMenuParam.m_QuestSelectAreaCateID).ToArray(); if (questAppearance.IsNullOrEmpty() == false) { m_QuestDetailInfo.BossLabel = questAppearance[0].boss_text_key; m_QuestDetailInfo.CountLabel = questAppearance[0].battle_text_key; } } //---------------------------------------- // 初心者ブースト適用 // 表示用の値を計算、補正値を適用 //---------------------------------------- uint exp = (uint)m_MasterDataQuest2.clear_exp; uint coin = (uint)m_MasterDataQuest2.clear_money; if (m_AreaAmendParam != null) { if (m_AreaAmendParam.m_QuestSelectAreaAmendEXP != 100) { // エリア補正時 exp = (uint)((float)exp * (m_AreaAmendParam.m_QuestSelectAreaAmendEXP / 100.0f)); m_QuestDetailInfo.ExpValue = string.Format(GameTextUtil.GetText("stmina_bahutext"), exp); } else { m_QuestDetailInfo.ExpValue = string.Format(GameTextUtil.GetText("value_colorset"), exp); } if (m_AreaAmendParam.m_QuestSelectAreaAmendCoin != 100) { // エリア補正時 coin = (uint)((float)coin * (m_AreaAmendParam.m_QuestSelectAreaAmendCoin / 100.0f)); m_QuestDetailInfo.CoinValue = string.Format(GameTextUtil.GetText("stmina_bahutext"), coin); } else { m_QuestDetailInfo.CoinValue = string.Format(GameTextUtil.GetText("value_colorset"), coin); } } MainMenuParam.m_QuestAddMoney = coin; } { //ミッション m_QuestDetailMission.Title = GameTextUtil.GetText("questinfo2_text"); m_QuestDetailMission.Count = 0; m_QuestDetailMission.CountMax = 0; } { //タブ m_QuestDetailInfo.tab.DidTabChenged = (QuestDetailTabContext tab) => { m_model.currentType = tab.m_Type; OnSelectTabButton(); }; m_QuestDetailInfo.tab.Clear(); m_QuestDetailInfo.tab.AddTab(GameTextUtil.GetText("questinfo_text6"), QuestDetailModel.TabType.Info); m_QuestDetailInfo.tab.AddTab(GameTextUtil.GetText("questinfo_text7"), QuestDetailModel.TabType.Mission); if (m_MasterDataQuest2.quest_requirement_id != 0) { m_QuestDetailInfo.tab.AddTab(GameTextUtil.GetText("questinfo_text8"), QuestDetailModel.TabType.Rule); } if (m_MasterDataQuest2.boss_ability_1 != 0 || m_MasterDataQuest2.boss_ability_2 != 0 || m_MasterDataQuest2.boss_ability_3 != 0 || m_MasterDataQuest2.boss_ability_4 != 0) { m_QuestDetailInfo.tab.AddTab(GameTextUtil.GetText("questinfo_text9"), QuestDetailModel.TabType.Boss); } } { UnityUtil.SetObjectEnabledOnce(m_QuestDetailInfo.gameObject, true); UnityUtil.SetObjectEnabledOnce(m_QuestDetailMessage.gameObject, false); UnityUtil.SetObjectEnabledOnce(m_QuestDetailMission.gameObject, false); } }