private SlotitemModel_Battle getProdPlane(SakutekiModel model)
 {
     using (List <List <SlotitemModel_Battle> > .Enumerator enumerator = model.planes_f.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             List <SlotitemModel_Battle> current = enumerator.get_Current();
             if (current != null)
             {
                 using (List <SlotitemModel_Battle> .Enumerator enumerator2 = current.GetEnumerator())
                 {
                     while (enumerator2.MoveNext())
                     {
                         SlotitemModel_Battle current2 = enumerator2.get_Current();
                         if (current2 != null)
                         {
                             return(current2);
                         }
                     }
                 }
             }
         }
     }
     return(null);
 }
 public SakutekiModel GetSakutekiData()
 {
     if (this._cache_sakuteki == null && this._phase == CombatPhase.DAY)
     {
         this._cache_sakuteki = new SakutekiModel(this._battleData.DayBattle.Search, this._ships_f, this._ships_e);
     }
     return(this._cache_sakuteki);
 }
Exemple #3
0
 public SakutekiModel GetSakutekiData()
 {
     if (_cache_sakuteki == null && _phase == CombatPhase.DAY)
     {
         _cache_sakuteki = new SakutekiModel(_battleData.DayBattle.Search, _ships_f, _ships_e);
     }
     return(_cache_sakuteki);
 }
Exemple #4
0
 private DetectionProductionType getDetectionProductionType(SakutekiModel model)
 {
     if (model.IsSuccess_f())
     {
         if (model.HasPlane_f() && model.ExistLost_f())
         {
             return(DetectionProductionType.SuccesLost);
         }
         return(DetectionProductionType.Succes);
     }
     if (model.ExistLost_f())
     {
         return(DetectionProductionType.Lost);
     }
     return(DetectionProductionType.NotFound);
 }
Exemple #5
0
 private SlotitemModel_Battle getProdPlane(SakutekiModel model)
 {
     foreach (List <SlotitemModel_Battle> item in model.planes_f)
     {
         if (item != null)
         {
             foreach (SlotitemModel_Battle item2 in item)
             {
                 if (item2 != null)
                 {
                     return(item2);
                 }
             }
         }
     }
     return(null);
 }
        protected override bool Init()
        {
            this._clsSakuteki = BattleTaskManager.GetBattleManager().GetSakutekiData();
            if (this._clsSakuteki == null || !BattleTaskManager.GetBattleManager().IsExistSakutekiData())
            {
                base.ImmediateTermination();
                this.EndPhase(BattleUtils.NextPhase(BattlePhase.Detection));
                return(true);
            }
            this._clsState = new StatementMachine();
            this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitMoveCameraTo2D), new StatementMachine.StatementMachineUpdate(this.UpdateMoveCameraTo2D));
            Transform transform = BattleTaskManager.GetBattleCameras().cutInCamera.get_transform();

            this._prodDetectionCutIn       = ProdDetectionCutIn.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdDetectionCutIn.GetComponent <ProdDetectionCutIn>(), transform, this._clsSakuteki);
            this._prodDetectionResultCutIn = ProdDetectionResultCutIn.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdDetectionResultCutIn.GetComponent <ProdDetectionResultCutIn>(), transform, this._clsSakuteki);
            this._iResult = this._prodDetectionResultCutIn.detectionResult;
            return(true);
        }
Exemple #7
0
        protected override bool Init()
        {
            _clsSakuteki = BattleTaskManager.GetBattleManager().GetSakutekiData();
            if (_clsSakuteki == null || !BattleTaskManager.GetBattleManager().IsExistSakutekiData())
            {
                ImmediateTermination();
                EndPhase(BattleUtils.NextPhase(BattlePhase.Detection));
                return(true);
            }
            _clsState = new StatementMachine();
            _clsState.AddState(InitMoveCameraTo2D, UpdateMoveCameraTo2D);
            Transform transform = BattleTaskManager.GetBattleCameras().cutInCamera.transform;

            _prodDetectionCutIn       = ProdDetectionCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionCutIn).GetComponent <ProdDetectionCutIn>(), transform, _clsSakuteki);
            _prodDetectionResultCutIn = ProdDetectionResultCutIn.Instantiate(((Component)BattleTaskManager.GetPrefabFile().prefabProdDetectionResultCutIn).GetComponent <ProdDetectionResultCutIn>(), transform, _clsSakuteki);
            _iResult = _prodDetectionResultCutIn.detectionResult;
            return(true);
        }
Exemple #8
0
        public static ProdDetectionCutIn Instantiate(ProdDetectionCutIn prefab, Transform parent, SakutekiModel model)
        {
            ProdDetectionCutIn prodDetectionCutIn = UnityEngine.Object.Instantiate(prefab);

            prodDetectionCutIn.transform.parent        = parent;
            prodDetectionCutIn.transform.localScale    = Vector3.zero;
            prodDetectionCutIn.transform.localPosition = Vector3.zero;
            prodDetectionCutIn.setAircraft(KCV.Battle.Utils.SlotItemUtils.GetDetectionScoutingPlane(model.planes_f));
            return(prodDetectionCutIn);
        }
        public static ProdDetectionCutIn Instantiate(ProdDetectionCutIn prefab, Transform parent, SakutekiModel model)
        {
            ProdDetectionCutIn prodDetectionCutIn = Object.Instantiate <ProdDetectionCutIn>(prefab);

            prodDetectionCutIn.get_transform().set_parent(parent);
            prodDetectionCutIn.get_transform().set_localScale(Vector3.get_zero());
            prodDetectionCutIn.get_transform().set_localPosition(Vector3.get_zero());
            prodDetectionCutIn.setAircraft(KCV.Battle.Utils.SlotItemUtils.GetDetectionScoutingPlane(model.planes_f));
            return(prodDetectionCutIn);
        }
        public static ProdDetectionResultCutIn Instantiate(ProdDetectionResultCutIn prefab, Transform parent, SakutekiModel model)
        {
            ProdDetectionResultCutIn prodDetectionResultCutIn = Object.Instantiate <ProdDetectionResultCutIn>(prefab);

            prodDetectionResultCutIn.get_transform().set_parent(parent);
            prodDetectionResultCutIn.get_transform().set_localScale(Vector3.get_zero());
            prodDetectionResultCutIn.get_transform().set_localPosition(Vector3.get_zero());
            prodDetectionResultCutIn.setDetection(prodDetectionResultCutIn.getDetectionProductionType(model));
            return(prodDetectionResultCutIn);
        }
Exemple #11
0
        public static ProdDetectionResultCutIn Instantiate(ProdDetectionResultCutIn prefab, Transform parent, SakutekiModel model)
        {
            ProdDetectionResultCutIn prodDetectionResultCutIn = UnityEngine.Object.Instantiate(prefab);

            prodDetectionResultCutIn.transform.parent        = parent;
            prodDetectionResultCutIn.transform.localScale    = Vector3.zero;
            prodDetectionResultCutIn.transform.localPosition = Vector3.zero;
            prodDetectionResultCutIn.setDetection(prodDetectionResultCutIn.getDetectionProductionType(model));
            return(prodDetectionResultCutIn);
        }