Ejemplo n.º 1
0
 protected override bool Init()
 {
     _clsNightCombat = BattleTaskManager.GetBattleManager().GetNightCombatData();
     _clsHougekiList = BattleTaskManager.GetBattleManager().GetHougekiList_Night();
     if (_clsHougekiList == null)
     {
         EndPhase(BattleUtils.NextPhase(BattlePhase.NightCombat));
         ImmediateTermination();
     }
     else
     {
         _nCurrentShellingCnt = 1;
         _clsState            = new StatementMachine();
         _prodShellingAttack  = new ProdShellingAttack();
         _vCameraOriginPos    = BattleTaskManager.GetBattleCameras().fieldCameras[0].transform.position;
         if (!BattleTaskManager.GetIsSameBGM())
         {
             KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)BattleTaskManager.GetBattleManager().GetBgmId());
         }
         _clsState.AddState(InitNightMessage, UpdateNightMessage);
         Transform transform = UnityEngine.Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabSearchLightSceneController, Vector3.zero, Quaternion.identity) as Transform;
         _ctrlSearchLight = ((Component)transform).GetComponent <SearchLightSceneController>();
         Transform transform2 = UnityEngine.Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabFlareBulletSceneController, Vector3.zero, Quaternion.identity) as Transform;
         _ctrlFlareBullet = ((Component)transform2).GetComponent <FlareBulletSceneController>();
     }
     return(true);
 }
Ejemplo n.º 2
0
 protected override bool Init()
 {
     this._clsNightCombat = BattleTaskManager.GetBattleManager().GetNightCombatData();
     this._clsHougekiList = BattleTaskManager.GetBattleManager().GetHougekiList_Night();
     if (this._clsHougekiList == null)
     {
         this.EndPhase(BattleUtils.NextPhase(BattlePhase.NightCombat));
         base.ImmediateTermination();
     }
     else
     {
         this._nCurrentShellingCnt = 1;
         this._clsState            = new StatementMachine();
         this._prodShellingAttack  = new ProdShellingAttack();
         this._vCameraOriginPos    = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0).get_transform().get_position();
         if (!BattleTaskManager.GetIsSameBGM())
         {
             KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)BattleTaskManager.GetBattleManager().GetBgmId());
         }
         this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitNightMessage), new StatementMachine.StatementMachineUpdate(this.UpdateNightMessage));
         Transform transform = Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabSearchLightSceneController, Vector3.get_zero(), Quaternion.get_identity()) as Transform;
         this._ctrlSearchLight = transform.GetComponent <SearchLightSceneController>();
         Transform transform2 = Object.Instantiate(BattleTaskManager.GetPrefabFile().prefabFlareBulletSceneController, Vector3.get_zero(), Quaternion.get_identity()) as Transform;
         this._ctrlFlareBullet = transform2.GetComponent <FlareBulletSceneController>();
     }
     return(true);
 }
Ejemplo n.º 3
0
 public void __createCacheDataNight__()
 {
     if (_phase == CombatPhase.NIGHT)
     {
         RationModel ration = null;
         if (_GetRationData() != null)
         {
             ration = new RationModel(_ships_f, _GetRationData());
         }
         _cache_opening_n = new NightCombatModel(this, _battleData.NightBattle, ration);
         _cache_hougeki_n = null;
         if (_battleData.NightBattle.Hougeki != null)
         {
             List <Hougeki <BattleAtackKinds_Night> > hougeki = _battleData.NightBattle.Hougeki;
             _cache_hougeki_n = new HougekiListModel(hougeki, _GetShipsDic());
         }
     }
 }
        public void __createCacheDataNight__()
        {
            if (this._phase != CombatPhase.NIGHT)
            {
                return;
            }
            RationModel ration = null;

            if (this._GetRationData() != null)
            {
                ration = new RationModel(this._ships_f, this._GetRationData());
            }
            this._cache_opening_n = new NightCombatModel(this, this._battleData.NightBattle, ration);
            this._cache_hougeki_n = null;
            if (this._battleData.NightBattle.Hougeki != null)
            {
                List <Hougeki <BattleAtackKinds_Night> > hougeki = this._battleData.NightBattle.Hougeki;
                this._cache_hougeki_n = new HougekiListModel(hougeki, this._GetShipsDic());
            }
        }