public static void outputEnemyParty(BattleEnemy[] enemy_party) { for (int idx_enemy = 0; idx_enemy < enemy_party.Length; idx_enemy++) { BattleEnemy battle_enemy = enemy_party[idx_enemy]; DebugBattleLog.writeText(DebugBattleLog.StrOpe + "敵情報(" + idx_enemy.ToString() + ")" + " EnemyFixID:" + battle_enemy.getMasterDataParamEnemy().fix_id.ToString() + " CharaFixID:" + battle_enemy.getMasterDataParamChara().fix_id.ToString() + " 属性:" + battle_enemy.getMasterDataParamChara().element.ToString() + " 種族1:" + battle_enemy.getMasterDataParamChara().kind.ToString() + " 種族2:" + battle_enemy.getMasterDataParamChara().sub_kind.ToString() + " [" + battle_enemy.getMasterDataParamChara().name + "]" ); uint[] enemy_abilitys = battle_enemy.getEnemyAbilitys(); for (int idx_ability = 0; idx_ability < enemy_abilitys.Length; idx_ability++) { uint ability_fix_id = enemy_abilitys[idx_ability]; if (ability_fix_id != 0) { string ability_name = ""; MasterDataEnemyAbility ability_master = BattleParam.m_MasterDataCache.useEnemyAbility(ability_fix_id); if (ability_master != null) { ability_name = ability_master.name; } DebugBattleLog.writeText(DebugBattleLog.StrOpe + " 特性" + (idx_ability + 1).ToString() + "(FixId:" + ability_fix_id.ToString() + "):" + ability_name ); } } DebugBattleLog.writeText(DebugBattleLog.StrOpe + " " + " HP:" + battle_enemy.m_EnemyHP.ToString() + "/" + battle_enemy.m_EnemyHPMax.ToString() + " SkillTurn:" + battle_enemy.m_EnemyTurn.ToString() + "/" + battle_enemy.m_EnemyTurnMax.ToString() ); // 状態変化 StatusAilmentChara ailment = battle_enemy.m_StatusAilmentChara; outputAilment(ailment); } }
//------------------------------------------------------------------------ /*! * @brief 特性情報を表示 */ //------------------------------------------------------------------------ private void SetAbilityInformation(BattleEnemy enemy) { MasterDataEnemyAbility abilityMaster = null; string abilityLabel = ""; // 特性を配列化 uint[] enemyAbility = enemy.getEnemyAbilitys(); //-------------------------------- // ラベルをクリア(正常動作の場合、上書きされるのでクリアしなくてもいいが念のため) //-------------------------------- UnityUtil.SetUILabelValue(m_AbilityDetailObj[ABILITY_LABEL], ""); //-------------------------------- // 所持特性を全チェック //-------------------------------- int nLineCnt = 0; for (int num = 0; num < enemyAbility.Length; ++num) { if (enemyAbility[num] == 0) { continue; } // 特性マスターを取得 abilityMaster = MasterDataUtil.GetEnemyAbilityParamFromID((int)enemyAbility[num]); if (abilityMaster == null) { continue; } // 表示文を取得 if (abilityMaster.name != "") { abilityLabel += abilityMaster.name + "\r\n"; ++nLineCnt; } if (abilityMaster.detail != "") { abilityLabel += abilityMaster.detail + "\r\n"; ++nLineCnt; if (abilityMaster.detail.Contains("\r\n")) { ++nLineCnt; } } } // 特性情報ボタンの有効無効チェック if (abilityLabel != "") { // 末尾の改行コードを削除 abilityLabel = abilityLabel.Substring(0, (abilityLabel.Length - 2)); // ラベルを設定 UnityUtil.SetUILabelValue(m_AbilityDetailObj[ABILITY_LABEL], abilityLabel); // EMPTY文言非表示 UnityUtil.SetObjectEnabledOnce(m_AbilityDetailObj[AILMENT_LABEL_EMPTY], false); #if false // ボタンを有効化 UnityUtil.SetObjectEnabledOnce(m_ButtonAbilityInfo, true); #endif //#if true // // 一定行数以上であれば、スクロールバーの表示をON。 // UIDraggablePanel cUIDraggablePanel = m_DragNGUIDragPanelObj.GetComponent( typeof(UIDraggablePanel) ) as UIDraggablePanel; // if( null != cUIDraggablePanel ) // { // cUIDraggablePanel.enabled = ( nLineCnt > ABILITY_DRAGGABLEPANEL_ENABLE_LINE ); // }; //#else // // スクロールロック判定(250は、MsgListのUIPanelサイズ) // UnityUtil.SetDraggablePanelAutoLockUILabelHeight( m_DragNGUIDragPanelObj, m_AbilityDetailObj[ ABILITY_LABEL ], 250 ); //#endif //スクロール設定 // UnityUtil.SetDraggablePanelAutoLockUILabelHeight(m_DragNGUIDragPanelObj, m_AbilityDetailObj[ABILITY_LABEL], 250, false); } else { // EMPTY文言表示 UnityUtil.SetObjectEnabledOnce(m_AbilityDetailObj[AILMENT_LABEL_EMPTY], true); }
public void setupEnemyAbilityInfo(BattleEnemy enemy) { //-------------------------------- // エネミーマスターを取得 //-------------------------------- MasterDataParamEnemy enemyMaster = enemy.getMasterDataParamEnemy(); if (enemyMaster == null) { return; } AddAbilityInfo(GameTextUtil.GetText("battle_infotext2"), -1); // 特性を配列化 uint[] enemyAbility = enemy.getEnemyAbilitys(); int[] enemy_ability_turns = enemy.getEnemyAbilityTurns(); //-------------------------------- // 所持特性を全チェック //-------------------------------- bool is_write = false; for (int num = 0; num < enemyAbility.Length; ++num) { if (enemyAbility[num] == 0) { continue; } // 特性マスターを取得 MasterDataEnemyAbility abilityMaster = MasterDataUtil.GetEnemyAbilityParamFromID((int)enemyAbility[num]); if (abilityMaster == null) { continue; } // 表示文を取得 int enemy_ability_turn = enemy_ability_turns[num]; if (abilityMaster.name != "") { AddAbilityInfo(abilityMaster.name, enemy_ability_turn); enemy_ability_turn = 0; } if (abilityMaster.detail != "") { AddAbilityInfo(abilityMaster.detail, enemy_ability_turn); } is_write = true; } if (is_write) { // 何か敵特性があるときは、状態異常表示の前に空行がある AddAbilityInfo("", -1); } else { AddAbilityInfo("-", -1); } }