예제 #1
0
        private void InitHPGauge(BtlCut_UICircleHPGauge gauge, List <ShipModel_BattleResult> ships)
        {
            int num  = Enumerable.Sum(Enumerable.Select <ShipModel_BattleResult, int>(Enumerable.Where <ShipModel_BattleResult>(ships, (ShipModel_BattleResult x) => x != null), (ShipModel_BattleResult x) => x.HpStart));
            int num2 = Enumerable.Sum(Enumerable.Select <ShipModel_BattleResult, int>(Enumerable.Where <ShipModel_BattleResult>(ships, (ShipModel_BattleResult x) => x != null), (ShipModel_BattleResult x) => x.HpEnd));

            if (ships.get_Item(0).IsFriend())
            {
                this._nFriendFleetStartHP = num;
                this._nFriendFleetEndHP   = num2;
            }
            gauge.SetHPGauge(num, num, num2, false);
        }
예제 #2
0
        private void InitHPGauge(BtlCut_UICircleHPGauge gauge, List <ShipModel_BattleResult> ships)
        {
            int num = (from x in ships
                       where x != null
                       select x.HpStart).Sum();
            int num2 = (from x in ships
                        where x != null
                        select x.HpEnd).Sum();

            if (ships[0].IsFriend())
            {
                _nFriendFleetStartHP = num;
                _nFriendFleetEndHP   = num2;
            }
            gauge.SetHPGauge(num, num, num2, isChangeColor: false);
        }