private void _setParticlePanel(FleetType type, Transform trans)
 {
     _cloudParPanel[(int)type] = ((Component)base.transform.FindChild($"{type.ToString()}CloudParPanel")).GetComponent <UIPanel>();
     _cloudParPanel[(int)type].transform.parent        = trans;
     _cloudParPanel[(int)type].transform.localScale    = Vector3.one;
     _cloudParPanel[(int)type].transform.localPosition = Vector3.one;
     _cloudPar[(int)type] = ((Component)_cloudParPanel[(int)type].transform.FindChild("Smoke")).GetComponent <ParticleSystem>();
     ((Component)_cloudPar[(int)type]).transform.localEulerAngles = ((type != 0) ? new Vector3(0f, 90f, 90f) : new Vector3(0f, -90f, 90f));
     _cloudPar[(int)type].Play();
 }
        private void Awake()
        {
            this._iTimeZone = TimeZone.DayTime;
            if (this._traFieldCenter == null)
            {
                Util.FindParentToChild <Transform>(ref this._traFieldCenter, base.get_transform(), "CenterAnchor");
            }
            this._dicFleetAnchor = new Dictionary <FleetType, Transform>();
            int num = 0;

            using (List <Transform> .Enumerator enumerator = this._traFleetAnchorList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Transform current = enumerator.get_Current();
                    this._dicFleetAnchor.Add((FleetType)num, current);
                    num++;
                }
            }
            this._dicCameraAnchors = new Dictionary <CameraAnchorType, Dictionary <FleetType, Transform> >();
            Dictionary <FleetType, Transform> dictionary = new Dictionary <FleetType, Transform>();

            using (IEnumerator enumerator2 = Enum.GetValues(typeof(FleetType)).GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    FleetType fleetType = (FleetType)((int)enumerator2.get_Current());
                    if (fleetType != FleetType.CombinedFleet)
                    {
                        dictionary.Add(fleetType, base.get_transform().FindChild(string.Format("CameraAnchors/{0}OneRowAnchor", fleetType.ToString())).get_transform());
                    }
                }
            }
            this._dicCameraAnchors.Add(CameraAnchorType.OneRowAnchor, dictionary);
            this._dicFleetAnchorOrigine = new Dictionary <FleetType, Vector3>();
            this._dicFleetAnchorOrigine.Add(FleetType.Friend, this._dicFleetAnchor.get_Item(FleetType.Friend).get_transform().get_position());
            this._dicFleetAnchorOrigine.Add(FleetType.Enemy, this._dicFleetAnchor.get_Item(FleetType.Enemy).get_transform().get_position());
            this._dicSeaLevels = new Dictionary <FleetType, Water>();
            int num2 = 0;

            using (List <Transform> .Enumerator enumerator3 = this._traSeaLevelList.GetEnumerator())
            {
                while (enumerator3.MoveNext())
                {
                    Transform current2 = enumerator3.get_Current();
                    this._dicSeaLevels.Add((FleetType)num2, current2.GetComponent <Water>());
                    this._dicSeaLevels.get_Item((FleetType)num2).m_WaterMode = 1;
                    this._dicSeaLevels.get_Item((FleetType)num2).set_waveScale(0.02f);
                    this._dicSeaLevels.get_Item((FleetType)num2).set_reflectionDistort(1.5f);
                    num2++;
                }
            }
            this._dicSeaLevels.get_Item(FleetType.Enemy).SetLayer(Generics.Layers.SplitWater.IntLayer());
            this.isEnemySeaLevelActive = false;
            this._dicWaveDirs          = new Dictionary <FleetType, Vector4>();
            this._dicWaveDirs.Add(FleetType.Friend, new Vector4(-3.58f, -22.85f, 1f, -100f));
            this._dicWaveDirs.Add(FleetType.Enemy, new Vector4(3.58f, 22.85f, -1f, 100f));
            this._dicPSClouds = new Dictionary <FleetType, ParticleSystem>();
            using (IEnumerator enumerator4 = Enum.GetValues(typeof(FleetType)).GetEnumerator())
            {
                while (enumerator4.MoveNext())
                {
                    FleetType fleetType2 = (FleetType)((int)enumerator4.get_Current());
                    if (fleetType2 != FleetType.CombinedFleet)
                    {
                        ParticleSystem particleSystem = ParticleFile.Instantiate <ParticleSystem>(ParticleFileInfos.BattleAdventFleetCloud);
                        particleSystem.set_name(string.Format("Cloud{0}", fleetType2));
                        particleSystem.get_transform().set_parent(base.get_transform());
                        particleSystem.SetRenderQueue(3500);
                        particleSystem.get_transform().set_localScale(Vector3.get_one());
                        particleSystem.get_transform().set_position(Vector3.get_zero());
                        particleSystem.set_playOnAwake(false);
                        particleSystem.SetActive(false);
                        this._dicPSClouds.Add(fleetType2, particleSystem);
                    }
                }
            }
        }
Example #3
0
        public bool _init()
        {
            this._fieldCamera   = BattleTaskManager.GetBattleCameras().friendFieldCamera;
            this._uiPanel       = new UIPanel[2];
            this._uiAirObjF     = new GameObject[2];
            this._uiAirObjE     = new GameObject[2];
            this._cloudPanel    = new UIPanel[2];
            this._bgTex         = new UITexture[2];
            this._cloudParPanel = new UIPanel[2];
            this._cloudPar      = new ParticleSystem[2];
            this._gunPar        = new ParticleSystem[2];
            using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    FleetType fleetType = (FleetType)((int)enumerator.get_Current());
                    if (fleetType != FleetType.CombinedFleet)
                    {
                        Util.FindParentToChild <UIPanel>(ref this._uiPanel[(int)fleetType], base.get_transform(), string.Format("{0}Panel", fleetType.ToString()));
                        if (this._uiAirObjF[(int)fleetType] == null)
                        {
                            this._uiAirObjF[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("FAircraft").get_gameObject();
                        }
                        if (this._uiAirObjE[(int)fleetType] == null)
                        {
                            this._uiAirObjE[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("EAircraft").get_gameObject();
                        }
                        Util.FindParentToChild <UIPanel>(ref this._cloudPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudPanel", fleetType.ToString()));
                        Util.FindParentToChild <UITexture>(ref this._bgTex[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Bg");
                        Util.FindParentToChild <UIPanel>(ref this._cloudParPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudParPanel", fleetType.ToString()));
                        Util.FindParentToChild <ParticleSystem>(ref this._gunPar[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Gun");
                    }
                }
            }
            bool flag  = false;
            bool flag2 = false;

            if (this._clsAerial.IsBakugeki_f() || this._clsAerial.IsRaigeki_f())
            {
                flag = true;
            }
            if (this._clsAerial.IsBakugeki_e() || this._clsAerial.IsRaigeki_e())
            {
                flag2 = true;
            }
            if (flag && flag2)
            {
                this._iType = CutInType.Both;
            }
            else if (flag && !flag2)
            {
                this._iType = CutInType.FriendOnly;
            }
            BattleCameras           battleCameras     = BattleTaskManager.GetBattleCameras();
            BattleCutInCamera       cutInCamera       = battleCameras.cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            if (this._iType == CutInType.Both)
            {
                battleCameras.SetSplitCameras2D(true);
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            else if (this._iType == CutInType.FriendOnly)
            {
                cutInCamera.isCulling       = true;
                cutInEffectCamera.isCulling = true;
            }
            Observable.FromCoroutine(new Func <IEnumerator>(this._createAsyncAircrafts), false).Subscribe(delegate(Unit _)
            {
            });
            return(true);
        }
Example #4
0
 private void _setParticlePanel(FleetType type, Transform trans)
 {
     this._cloudParPanel[(int)type] = base.get_transform().FindChild(string.Format("{0}CloudParPanel", type.ToString())).GetComponent <UIPanel>();
     this._cloudParPanel[(int)type].get_transform().set_parent(trans);
     this._cloudParPanel[(int)type].get_transform().set_localScale(Vector3.get_one());
     this._cloudParPanel[(int)type].get_transform().set_localPosition(Vector3.get_one());
     this._cloudPar[(int)type] = this._cloudParPanel[(int)type].get_transform().FindChild("Smoke").GetComponent <ParticleSystem>();
     this._cloudPar[(int)type].get_transform().set_localEulerAngles((type != FleetType.Friend) ? new Vector3(0f, 90f, 90f) : new Vector3(0f, -90f, 90f));
     this._cloudPar[(int)type].Play();
 }
 protected override void Awake()
 {
     base.Awake();
     this.GetComponentThis(ref this._uiPanel);
     if (this._uiOverlay == null)
     {
         Util.FindParentToChild <UITexture>(ref this._uiOverlay, base.get_transform(), "Overlay");
     }
     if (this._clsFormationResult == null)
     {
         this._clsFormationResult = new ProdShellingFormationJudge.FormationResult(base.get_transform().FindChild("FormationResult"));
     }
     if (this._listFormation == null)
     {
         using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 FleetType fleetType = (FleetType)((int)enumerator.get_Current());
                 if (fleetType != FleetType.CombinedFleet)
                 {
                     this._listFormation.Add(new ProdShellingFormationJudge.Formation(base.get_transform().FindChild(string.Format("{0}Formation", fleetType.ToString()))));
                 }
             }
         }
     }
 }
Example #6
0
 private void init()
 {
     this._iList = ProdTorpedoCutIn.AnimationList.None;
     if (this._listShipTex == null)
     {
         this._listShipTex = new List <UITexture>();
         using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 FleetType fleetType = (FleetType)((int)enumerator.get_Current());
                 if (fleetType != FleetType.CombinedFleet)
                 {
                     this._listShipTex.Add(base.get_transform().FindChild(string.Format("{0}Ship/Anchor/Object2D", fleetType.ToString())).GetComponent <UITexture>());
                 }
             }
         }
     }
 }
 public bool _init()
 {
     this._fieldCamera   = BattleTaskManager.GetBattleCameras().friendFieldCamera;
     this._uiPanel       = new UIPanel[2];
     this._uiAirObjF     = new GameObject[2];
     this._uiAirObjE     = new GameObject[2];
     this._cloudPanel    = new UIPanel[2];
     this._bgTex         = new UITexture[2];
     this._cloudParPanel = new UIPanel[2];
     this._cloudPar      = new ParticleSystem[2];
     this._gunPar        = new ParticleSystem[2];
     this._labelPanel    = new UIPanel[2];
     this._supremacyTxt  = new UITexture[2];
     using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             FleetType fleetType = (FleetType)((int)enumerator.get_Current());
             if (fleetType != FleetType.CombinedFleet)
             {
                 Util.FindParentToChild <UIPanel>(ref this._uiPanel[(int)fleetType], base.get_transform(), string.Format("{0}Panel", fleetType.ToString()));
                 if (this._uiAirObjF[(int)fleetType] == null)
                 {
                     this._uiAirObjF[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("FAircraft").get_gameObject();
                 }
                 if (this._uiAirObjE[(int)fleetType] == null)
                 {
                     this._uiAirObjE[(int)fleetType] = this._uiPanel[(int)fleetType].get_transform().FindChild("EAircraft").get_gameObject();
                 }
                 Util.FindParentToChild <UIPanel>(ref this._cloudPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudPanel", fleetType.ToString()));
                 Util.FindParentToChild <UITexture>(ref this._bgTex[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Bg");
                 Util.FindParentToChild <UIPanel>(ref this._cloudParPanel[(int)fleetType], base.get_transform(), string.Format("{0}CloudParPanel", fleetType.ToString()));
                 Util.FindParentToChild <ParticleSystem>(ref this._gunPar[(int)fleetType], this._cloudPanel[(int)fleetType].get_transform(), "Gun");
                 Util.FindParentToChild <UIPanel>(ref this._labelPanel[(int)fleetType], base.get_transform(), string.Format("{0}LabelPanel", fleetType.ToString()));
                 Util.FindParentToChild <UITexture>(ref this._supremacyTxt[(int)fleetType], this._labelPanel[(int)fleetType].get_transform(), "SupremacyTxt");
             }
         }
     }
     this._labelPanel[1].SetActive(false);
     if (this._iType == CutInType.Both)
     {
         this._labelPanel[0].SetLayer(8);
         this._labelPanel[1].SetLayer(1);
         this._labelPanel[1].SetActive(true);
     }
     else if (this._iType == CutInType.EnemyOnly)
     {
         this._supremacyTxt[0].get_transform().set_localScale(Vector3.get_one());
         this._labelPanel[0].SetLayer(14);
     }
     else if (this._iType == CutInType.FriendOnly)
     {
         this._supremacyTxt[0].get_transform().set_localScale(Vector3.get_one());
         this._labelPanel[0].SetLayer(14);
     }
     this._createAsyncAircrafts();
     return(true);
 }