コード例 #1
0
        private void OnFormationSelected(BattleFormationKinds1 iFormation)
        {
            SortieMapTaskManager.GetUIShipCharacter().Hide(null);
            SortieMapTaskManager.GetUIAreaMapFrame().Hide();
            ProdSortieTransitionToBattle prodSortieTransitionToBattle = SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle;

            SortieBattleTaskManager.GetTransitionCamera().enabled = true;
            prodSortieTransitionToBattle.Play(delegate
            {
                Hashtable hashtable = new Hashtable();
                if (SortieBattleTaskManager.GetMapManager().GetType().Equals(typeof(RebellionMapManager)))
                {
                    hashtable.Add("rootType", Generics.BattleRootType.Rebellion);
                    hashtable.Add("rebellionMapManager", SortieBattleTaskManager.GetMapManager());
                }
                else
                {
                    hashtable.Add("rootType", Generics.BattleRootType.SortieMap);
                    hashtable.Add("sortieMapManager", SortieBattleTaskManager.GetMapManager());
                }
                hashtable.Add("formation", iFormation);
                RetentionData.SetData(hashtable);
                SortieBattleTaskManager.ReqMode(SortieBattleMode.Battle);
            });
        }
コード例 #2
0
        private new void Start()
        {
            InitBattleData();
            _clsSettingModel   = new SettingModel();
            _iPhase            = (_iPhaseReq = BattlePhase.BattlePhase_BEF);
            _traStage          = base.transform.FindChild("Stage");
            _clsBattleShips    = new BattleShips();
            _clsBattleCameras  = new BattleCameras();
            _clsBattleHPGauges = new BattleHPGauges();
            _clsBattleField    = base.transform.GetComponentInChildren <BattleField>();
            UICircleHPGauge    circleHPGauge    = _clsBattlePrefabFile.circleHPGauge;
            UIBattleNavigation battleNavigation = _clsBattlePrefabFile.battleNavigation;

            battleNavigation.panel.depth = 100;
            _clsTorpedoHpGauges          = new TorpedoHpGauges();
            _clsBattleShips.Init(GetBattleManager());
            _clsBattleField.ReqTimeZone(GetStartTimeZone(GetBattleManager().WarType), GetSkyType());
            KCV.Utils.SoundUtils.SwitchBGM((BGMFileInfos)GetBattleManager().GetBgmId());
            ProdSortieTransitionToBattle psttb = (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null) ? SortieBattleTaskManager.GetSortieBattlePrefabFile().prodSortieTransitionToBattle : ProdSortieTransitionToBattle.Instantiate(Resources.Load <ProdSortieTransitionToBattle>("Prefabs/SortieMap/SortieTransitionToBattle/ProdSortieTransitionToBattle"), _clsBattleCameras.cutInCamera.transform).QuickFadeInInit();

            Observable.FromCoroutine((UniRx.IObserver <float> observer) => InitBattle(observer)).Subscribe(delegate(float x)
            {
                if (x == 1f)
                {
                    _iPhase = (_iPhaseReq = BattlePhase.FleetAdvent);
                    Observable.Timer(TimeSpan.FromSeconds(0.30000001192092896)).Subscribe(delegate
                    {
                        _clsBattleField.AlterWaveDirection(FleetType.Friend);
                        psttb.Play(ProdSortieTransitionToBattle.AnimationName.ProdSortieTransitionToBattleFadeIn, delegate
                        {
                            if (SortieBattleTaskManager.GetSortieBattlePrefabFile() != null)
                            {
                                SortieBattleTaskManager.GetSortieBattlePrefabFile().DisposeProdSortieTransitionToBattle();
                            }
                            else
                            {
                                UnityEngine.Object.Destroy(psttb.gameObject);
                            }
                            if (SortieBattleTaskManager.GetTransitionCamera() != null)
                            {
                                SortieBattleTaskManager.GetTransitionCamera().enabled = false;
                            }
                            Mem.Del(ref psttb);
                        });
                    });
                }
            }).AddTo(base.gameObject);
        }