private void setupSkill() { if (m_StatusType == StatusType.Catalog) { //スキルパネル m_UnitSkillPanel.AddLeaderSkill(m_MainUnitMaster.skill_leader); m_UnitSkillPanel.AddLimitBreakSkill(m_MainUnitMaster.skill_limitbreak, 0); m_UnitSkillPanel.AddActiveSkill(m_MainUnitMaster.skill_active0); if (m_MainUnitMaster.skill_active1 != 0) { m_UnitSkillPanel.AddActiveSkill(m_MainUnitMaster.skill_active1); } if (m_MainUnitMaster.skill_passive != 0) { m_UnitSkillPanel.AddPassiveSkill(m_MainUnitMaster.skill_passive); } } else if (m_StatusType == StatusType.Unit) { //スキルパネル m_UnitSkillPanel.AddLeaderSkill(m_MainUnitMaster.skill_leader); m_UnitSkillPanel.AddLimitBreakSkill(m_MainUnitMaster.skill_limitbreak, (int)m_MainUnit.limitbreak_lv); m_UnitSkillPanel.AddActiveSkill(m_MainUnitMaster.skill_active0); if (m_MainUnitMaster.skill_active1 != 0) { m_UnitSkillPanel.AddActiveSkill(m_MainUnitMaster.skill_active1); } if (m_MainUnitMaster.skill_passive != 0) { m_UnitSkillPanel.AddPassiveSkill(m_MainUnitMaster.skill_passive); } } m_Setup[(int)ToggleType.Skill] = true; }
public void Show(MasterDataParamChara charaMaster, PacketStructUnit _mainUnit = null, PacketStructUnit _subUnit = null) { IsViewDialog = true; PanelColor = 0; m_UnitSkillPanel.AllClear(); m_UnitSkillPanel.AddLeaderSkill(charaMaster.skill_leader); if (_mainUnit == null) { m_UnitSkillPanel.AddLimitBreakSkill(charaMaster.skill_limitbreak, 0); } else { m_UnitSkillPanel.AddLimitBreakSkill(charaMaster.skill_limitbreak, (int)_mainUnit.limitbreak_lv); } m_UnitSkillPanel.AddActiveSkill(charaMaster.skill_active0); skillPanelCount = 3; if (charaMaster.skill_active1 != 0) { m_UnitSkillPanel.AddActiveSkill(charaMaster.skill_active1); ++skillPanelCount; } if (charaMaster.skill_passive != 0) { m_UnitSkillPanel.AddPassiveSkill(charaMaster.skill_passive); ++skillPanelCount; } m_UnitSkillPanel.setupChara(charaMaster.fix_id, _mainUnit); ShadowPanel.GetComponent <Image>().DOFade(FadeShowAlpha, AnimationTime); Window.transform.DOScaleY(WindowShowScale, AnimationTime).OnComplete(() => { PanelColor = 1; m_Ready = true; }); if (AndroidBackKeyManager.HasInstance) { //バックキーが押された時のアクションを登録 AndroidBackKeyManager.Instance.StackPush(gameObject, OnClose); } }
//------------------------------------------------------------------------ /*! * @brief 更新処理 */ //------------------------------------------------------------------------ private void initPanel() { if (m_CharaIdx == GlobalDefine.PartyCharaIndex.ERROR) { return; } PacketStructUnit _unit = null; PacketStructUnit _linkunit = null; { _unit = new PacketStructUnit(); _unit.id = m_CharaId; _unit.level = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLevel; _unit.unique_id = 1; // ダミー _unit.add_pow = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusPow; _unit.add_def = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusDef; _unit.add_hp = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaPlusHP; _unit.limitbreak_lv = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLBSLv; _unit.limitover_lv = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaLimitOver; _unit.link_info = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_NONE; if (InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaID != 0) { _unit.link_info = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_BASE; _linkunit = new PacketStructUnit(); _linkunit.id = InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaID; _linkunit.level = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLv; _linkunit.add_pow = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaPlusPow; _linkunit.add_hp = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaPlusHP; _unit.link_point = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLinkPoint; _linkunit.limitover_lv = (uint)InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_LinkParam.m_CharaLOLevel; _linkunit.link_info = (uint)ServerDataDefine.CHARALINK_TYPE.CHARALINK_TYPE_LINK; } } MasterDataParamChara _master = InGamePlayerParty.m_PlayerPartyChara[(int)m_CharaIdx].m_CharaMasterDataParam; // 名前パネル設定 unitNamePanel.setup(_master); unitNamePanel.IsViewPremiumButton = false; // スキルパネル設定 unitSkillPanel.AllClear(); unitSkillPanel.AddLeaderSkill(_master.skill_leader); unitSkillPanel.AddLimitBreakSkill(_master.skill_limitbreak, (int)_unit.limitbreak_lv); unitSkillPanel.AddActiveSkill(_master.skill_active0); if (_master.skill_passive == 0) { unitSkillPanel.AddActiveSkill(_master.skill_active1); } if (_master.skill_passive != 0) { unitSkillPanel.AddPassiveSkill(_master.skill_passive); } // ステータスパネル設定 CharaParty party = BattleParam.m_PlayerParty; CharaOnce party_unit = party.getPartyMember(m_CharaIdx, CharaParty.CharaCondition.EXIST); int pow = (int)((float)party_unit.m_CharaPow * InGameUtil.getCharaAttakPowScale(party_unit, BattleParam.m_PlayerParty.m_Ailments.getAilment(m_CharaIdx))); unitParamPanel.setupUnit(_unit, _linkunit, false, party.m_HPCurrent.getValue(m_CharaIdx), party.m_HPMax.getValue(m_CharaIdx), pow); unitParamPanel.IsViewExp = false; if (_linkunit != null) { // リンクパネル設定 unitLinkPanel.setupUnit(_unit, _linkunit, UnitLinkPanel.LinkParamType.Link); skillWindowTag.Link_tag_active = true; } else { skillWindowTag.Link_tag_active = false; } // 状態異常パネル設定 unitAilmentPanel.AllClear(); unitAilmentPanel.setupCharaAilmentInfo(SceneModeContinuousBattle.Instance.m_PlayerParty.m_Ailments.getAilment(m_CharaIdx)); UnityUtil.SetObjectEnabledOnce(heroDetailPanel.gameObject, false); Label_text = GameTextUtil.GetText("battle_infotext3"); }
// Update is called once per frame void Update() { if (SceneCommon.Instance.IsLoadingScene) { return; } if (!mbInit && UserDataAdmin.Instance.m_StructPlayer != null) { PacketStructUnit _unit = UserDataAdmin.Instance.m_StructPlayer.unit_list[UnitId]; PacketStructUnit _linkunit = UserDataAdmin.Instance.SearchChara(_unit.link_unique_id); MasterDataParamChara _master = MasterFinder <MasterDataParamChara> .Instance.Find((int)_unit.id); unitNamePanel.setup(_master); if (!IsViewNamePanel) { UnityUtil.SetObjectEnabledOnce(unitNamePanel.gameObject, false); } unitParamPanel.setupUnit(_unit, _linkunit); unitParamPanel.IsViewExp = true; if (!IsViewParamPanel) { UnityUtil.SetObjectEnabledOnce(unitParamPanel.gameObject, false); } unitStoryPanel.setup(_unit.id); if (!IsViewStoryPanel) { UnityUtil.SetObjectEnabledOnce(unitStoryPanel.gameObject, false); } unitSkillPanel.AddLeaderSkill(_master.skill_leader); unitSkillPanel.AddLimitBreakSkill(_master.skill_limitbreak, (int)_unit.limitbreak_lv); if (_master.skill_active0 != 0) { unitSkillPanel.AddActiveSkill(_master.skill_active0); } if (_master.skill_active1 != 0) { unitSkillPanel.AddActiveSkill(_master.skill_active1); } if (_master.skill_passive != 0) { unitSkillPanel.AddPassiveSkill(_master.skill_passive); } if (!IsViewSkillPanel) { UnityUtil.SetObjectEnabledOnce(unitSkillPanel.gameObject, false); } unitLinkPanel.setupUnit(_unit, _linkunit, UnitLinkPanel.LinkParamType.LinkEffect); if (!IsViewLinkPanel) { UnityUtil.SetObjectEnabledOnce(unitLinkPanel.gameObject, false); } unitMaterialPanel.setIconSize(80); unitMaterialPanel.addItem(0, 10); unitMaterialPanel.addItem(0, 20); unitMaterialPanel.addItem(0, 30); if (!IsViewMaterialPanel2) { UnityUtil.SetObjectEnabledOnce(unitMaterialPanel.gameObject, false); } mbInit = true; } }