private bool InitBattleData(bool isNightCombat) { BattleManager battleManager = BattleCutManager.GetBattleManager(); BattleData battleData = BattleCutManager.GetBattleData(); ProdBCBattle.FleetInfos fleetInfos = this._listFleetInfos.get_Item(0); ProdBCBattle.FleetInfos fleetInfos2 = this._listFleetInfos.get_Item(1); battleData.friendFleetHP.attackCnt = 4; battleData.enemyFleetHP.attackCnt = 4; battleData.friendFleetHP.ClearOneAttackDamage(); battleData.enemyFleetHP.ClearOneAttackDamage(); this._listFleetInfos.ForEach(delegate(ProdBCBattle.FleetInfos x) { x.circleGauge.SetActive(true); }); this._listFleetInfos.ForEach(delegate(ProdBCBattle.FleetInfos x) { x.shipHPBarAnchor.SetActive(true); }); this._listFleetInfos.get_Item(0).shipHPBarAnchor.localPositionX(-346.5f); this.CalcSumHp(); for (int i = 0; i < 6; i++) { ShipModel_BattleAll shipModel_BattleAll = battleManager.Ships_f[i]; ShipModel_BattleAll shipModel_BattleAll2 = battleManager.Ships_e[i]; if (shipModel_BattleAll != null) { fleetInfos.hpBars.get_Item(i).SetHpBar(shipModel_BattleAll); fleetInfos.hpBars.get_Item(i).hpData.SetEndHP(shipModel_BattleAll.HpEnd); for (int j = 0; j < fleetInfos.hpBars.get_Item(i).hpData.oneAttackDamage.Length; j++) { battleData.friendFleetHP.oneAttackDamage[j] += fleetInfos.hpBars.get_Item(i).hpData.oneAttackDamage[j]; } } else { fleetInfos.hpBars.get_Item(i).Hide(); } if (shipModel_BattleAll2 != null) { fleetInfos2.hpBars.get_Item(i).SetHpBar(shipModel_BattleAll2); fleetInfos2.hpBars.get_Item(i).hpData.SetEndHP(shipModel_BattleAll2.HpEnd); for (int k = 0; k < fleetInfos2.hpBars.get_Item(i).hpData.oneAttackDamage.Length; k++) { battleData.enemyFleetHP.oneAttackDamage[k] += fleetInfos2.hpBars.get_Item(i).hpData.oneAttackDamage[k]; } } else { fleetInfos2.hpBars.get_Item(i).Hide(); } } return(true); }
public void setResultHPModeAdvancingWithdrawal(float y) { BattleManager battleManager = BattleCutManager.GetBattleManager(); ProdBCBattle.FleetInfos fleetInfos = this._listFleetInfos.get_Item(0); ProdBCBattle.FleetInfos fleetInfos2 = this._listFleetInfos.get_Item(1); for (int i = 0; i < 6; i++) { ShipModel_BattleAll shipModel_BattleAll = battleManager.Ships_f[i]; if (shipModel_BattleAll != null) { fleetInfos.hpBars.get_Item(i).SetHpBarAfter(shipModel_BattleAll, battleManager); } } this._listFleetInfos.get_Item(0).shipHPBarAnchor.localPositionX(-140.5f); this._listFleetInfos.get_Item(0).shipHPBarAnchor.localPositionY(y); this.Show(1f); this._listFleetInfos.ForEach(delegate(ProdBCBattle.FleetInfos x) { x.circleGauge.SetActive(false); }); this._listFleetInfos.get_Item(1).shipHPBarAnchor.SetActive(false); }