Пример #1
0
        protected virtual void ChkDamagedStateFmAnticipating(Vector3 closeUpPos)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras.get_Item(0);

            switch (this._clsHougekiModel.Defender.DamageEventAfter)
            {
            case DamagedStates.None:
            case DamagedStates.Shouha:
                battleFieldCamera.get_transform().LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1)).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE.get_Item(1)).setOnComplete(delegate
                {
                    this.OnFinished();
                });
                break;

            case DamagedStates.Tyuuha:
            case DamagedStates.Taiha:
                battleFieldCamera.get_transform().LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(1)).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE.get_Item(1)).setOnComplete(delegate
                {
                    ShellingProdSubject shellingProdSubject2 = (!this.isProtect) ? ShellingProdSubject.Defender : ShellingProdSubject.Protector;
                    if (this._listBattleShips.get_Item((int)shellingProdSubject2).shipModel.IsFriend())
                    {
                        DamagedStates damageEventAfter        = this._clsHougekiModel.Defender.DamageEventAfter;
                        ProdDamageCutIn.DamageCutInType iType = (damageEventAfter != DamagedStates.Taiha) ? ProdDamageCutIn.DamageCutInType.Moderate : ProdDamageCutIn.DamageCutInType.Heavy;
                        ProdDamageCutIn prodDamageCutIn       = BattleTaskManager.GetPrefabFile().prodDamageCutIn;
                        ProdDamageCutIn arg_76_0       = prodDamageCutIn;
                        List <ShipModel_Defender> list = new List <ShipModel_Defender>();
                        list.Add(this._clsHougekiModel.Defender);
                        arg_76_0.SetShipData(list, iType);
                        prodDamageCutIn.Play(iType, delegate
                        {
                            BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().set_localScale(Vector3.get_zero());
                        }, delegate
                        {
                            BattleTaskManager.GetBattleShips().UpdateDamageAll(this._clsHougekiModel);
                            this.OnFinished();
                        });
                    }
                    else
                    {
                        this.OnFinished();
                    }
                });
                break;

            case DamagedStates.Gekichin:
            case DamagedStates.Youin:
            case DamagedStates.Megami:
            {
                bool isFriend = this._listBattleShips.get_Item(1).shipModel.IsFriend();
                ShellingProdSubject shellingProdSubject = (!this.isProtect) ? ShellingProdSubject.Defender : ShellingProdSubject.Protector;
                this._listBattleShips.get_Item((int)shellingProdSubject).PlayProdSinking(null);
                battleFieldCamera.get_transform().LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME.get_Item(2)).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE.get_Item(1)).setOnComplete(delegate
                    {
                        if (!isFriend)
                        {
                            this.OnFinished();
                        }
                    });
                if (isFriend)
                {
                    Observable.Timer(TimeSpan.FromSeconds(1.0)).Subscribe(delegate(long _)
                        {
                            ProdSinking prodSinking = BattleTaskManager.GetPrefabFile().prodSinking;
                            prodSinking.SetSinkingData(this._clsHougekiModel.Defender);
                            prodSinking.Play(delegate
                            {
                                BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().set_localScale(Vector3.get_zero());
                            }, delegate
                            {
                            }, delegate
                            {
                                this.OnFinished();
                            });
                            BattleTaskManager.GetPrefabFile().circleHPGauge.get_transform().set_localScale(Vector3.get_zero());
                        });
                }
                break;
            }
            }
        }
        protected virtual void ChkDamagedStateFmAnticipating(Vector3 closeUpPos)
        {
            BattleCameras     battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleFieldCamera battleFieldCamera = battleCameras.fieldCameras[0];

            switch (_clsHougekiModel.Defender.DamageEventAfter)
            {
            case DamagedStates.Gekichin:
            case DamagedStates.Youin:
            case DamagedStates.Megami:
            {
                bool isFriend             = _listBattleShips[1].shipModel.IsFriend();
                ShellingProdSubject index = (!isProtect) ? ShellingProdSubject.Defender : ShellingProdSubject.Protector;
                _listBattleShips[(int)index].PlayProdSinking(null);
                battleFieldCamera.transform.LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[2]).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE[1]).setOnComplete((Action) delegate
                    {
                        if (!isFriend)
                        {
                            OnFinished();
                        }
                    });
                if (isFriend)
                {
                    Observable.Timer(TimeSpan.FromSeconds(1.0)).Subscribe(delegate
                        {
                            ProdSinking prodSinking = BattleTaskManager.GetPrefabFile().prodSinking;
                            prodSinking.SetSinkingData(_clsHougekiModel.Defender);
                            prodSinking.Play(delegate
                            {
                                BattleTaskManager.GetPrefabFile().circleHPGauge.transform.localScale = Vector3.zero;
                            }, delegate
                            {
                            }, delegate
                            {
                                OnFinished();
                            });
                            BattleTaskManager.GetPrefabFile().circleHPGauge.transform.localScale = Vector3.zero;
                        });
                }
                break;
            }

            case DamagedStates.Tyuuha:
            case DamagedStates.Taiha:
                battleFieldCamera.transform.LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1]).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE[1]).setOnComplete((Action) delegate
                {
                    ShellingProdSubject index2 = (!isProtect) ? ShellingProdSubject.Defender : ShellingProdSubject.Protector;
                    if (_listBattleShips[(int)index2].shipModel.IsFriend())
                    {
                        DamagedStates damageEventAfter        = _clsHougekiModel.Defender.DamageEventAfter;
                        ProdDamageCutIn.DamageCutInType iType = (damageEventAfter == DamagedStates.Taiha) ? ProdDamageCutIn.DamageCutInType.Heavy : ProdDamageCutIn.DamageCutInType.Moderate;
                        ProdDamageCutIn prodDamageCutIn       = BattleTaskManager.GetPrefabFile().prodDamageCutIn;
                        prodDamageCutIn.SetShipData(new List <ShipModel_Defender>
                        {
                            _clsHougekiModel.Defender
                        }, iType);
                        prodDamageCutIn.Play(iType, delegate
                        {
                            BattleTaskManager.GetPrefabFile().circleHPGauge.transform.localScale = Vector3.zero;
                        }, delegate
                        {
                            BattleTaskManager.GetBattleShips().UpdateDamageAll(_clsHougekiModel);
                            OnFinished();
                        });
                    }
                    else
                    {
                        OnFinished();
                    }
                });
                break;

            case DamagedStates.None:
            case DamagedStates.Shouha:
                battleFieldCamera.transform.LTMove(closeUpPos, BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_TIME[1]).setEase(BattleDefines.SHELLING_ATTACK_DEFENDER_CLOSEUP_EASING_TYPE[1]).setOnComplete((Action) delegate
                {
                    OnFinished();
                });
                break;
            }
        }