private int[] addHpGauge(bool isFriend, BattleHPGauges hpGauges)
        {
            BattleCutInCamera cutInCamera = BattleTaskManager.GetBattleCameras().cutInCamera;
            int num      = (!isFriend) ? this._eBattleship.get_Count() : this._fBattleship.get_Count();
            int arg_3A_0 = (!isFriend) ? 1 : 0;

            int[] array = new int[num];
            List <ShipModel_Defender> defenders = this._clsRaigeki.GetDefenders(isFriend, true);

            for (int i = 0; i < num; i++)
            {
                hpGauges.AddInstantiates(cutInCamera.get_transform().get_gameObject(), isFriend, false, true, true);
                array[i] = defenders.get_Item(i).HpBefore;
                if (isFriend)
                {
                    this._dicIsMiss.get_Item(FleetType.Friend)[i]      = false;
                    this._dicIsCriticall.get_Item(FleetType.Friend)[i] = false;
                }
                else
                {
                    this._dicIsMiss.get_Item(FleetType.Enemy)[i]      = false;
                    this._dicIsCriticall.get_Item(FleetType.Enemy)[i] = false;
                }
            }
            return(array);
        }
        private void _moveCamera()
        {
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            this._uiPanel[0].get_transform().set_parent(cutInCamera.get_transform());
            this._uiPanel[0].get_transform().set_localPosition(Vector3.get_one());
            this._uiPanel[1].get_transform().set_parent(cutInEffectCamera.get_transform());
            this._uiPanel[1].get_transform().set_localPosition(Vector3.get_one());
            for (int i = 0; i < this._listAircraft.get_Count(); i++)
            {
                if (!(this._listAircraft.get_Item(i) == null))
                {
                    if (this._listAircraft.get_Item(i).get_transform().get_parent().get_parent().get_name() == "FriendPanel")
                    {
                        if (this._listAircraft.get_Item(i)._fleetType == FleetType.Friend)
                        {
                            this._listAircraft.get_Item(i).EndMove(2000f, 0.8f);
                        }
                        else if (this._listAircraft.get_Item(i)._fleetType == FleetType.Enemy)
                        {
                            this._listAircraft.get_Item(i).EndMove(3000f, 0.8f);
                        }
                    }
                    if (this._listAircraft.get_Item(i).get_transform().get_parent().get_parent().get_name() == "EnemyPanel")
                    {
                        if (this._listAircraft.get_Item(i)._fleetType == FleetType.Friend)
                        {
                            this._listAircraft.get_Item(i).EndMove(3000f, 0.8f);
                        }
                        else if (this._listAircraft.get_Item(i)._fleetType == FleetType.Enemy)
                        {
                            this._listAircraft.get_Item(i).EndMove(2000f, 0.8f);
                        }
                    }
                }
            }
            for (int j = 0; j < 2; j++)
            {
                this._baseMoveTo(Vector3.get_zero(), 1f, 0f, iTween.EaseType.linear, string.Empty, this._bgTex[j].get_transform());
            }
        }
Ejemplo n.º 3
0
        public void Play(Action callback)
        {
            this._actCallback = callback;
            this._fieldCamera.ReqViewMode(CameraActor.ViewMode.NotViewModeCtrl);
            this._fieldCamera.get_transform().set_localPosition(new Vector3(0f, 12f, 0f));
            this._fieldCamera.get_transform().set_localRotation(Quaternion.Euler(-16f, 0f, 0f));
            BattleCutInCamera       cutInCamera       = BattleTaskManager.GetBattleCameras().cutInCamera;
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInCamera.cullingMask       = (Generics.Layers.TransparentFX | Generics.Layers.UI2D | Generics.Layers.CutIn);
            cutInCamera.depth             = 4f;
            cutInEffectCamera.cullingMask = (Generics.Layers.Background | Generics.Layers.CutIn);
            cutInEffectCamera.depth       = 5f;
            cutInEffectCamera.glowEffect.set_enabled(false);
            Vector3[] array = new Vector3[]
            {
                cutInCamera.get_transform().get_localPosition(),
                      cutInEffectCamera.get_transform().get_localPosition()
            };
            using (IEnumerator enumerator = Enum.GetValues(typeof(FleetType)).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    FleetType fleetType = (FleetType)((int)enumerator.get_Current());
                    if (fleetType != FleetType.CombinedFleet)
                    {
                        this._uiPanel[(int)fleetType].get_transform().set_localPosition(array[(int)fleetType]);
                        this._cloudPanel[(int)fleetType].get_transform().set_parent((fleetType != FleetType.Friend) ? cutInEffectCamera.get_transform() : cutInCamera.get_transform());
                        this._cloudParPanel[(int)fleetType] = null;
                        this._cloudPanel[(int)fleetType].get_transform().set_localPosition(Vector3.get_zero());
                    }
                }
            }
            if (this._iType == CutInType.Both)
            {
                this._setParticlePanel(FleetType.Friend, cutInCamera.get_transform());
                this._setParticlePanel(FleetType.Enemy, cutInEffectCamera.get_transform());
                this._gunPar[0].get_transform().set_localPosition(new Vector3(400f, this._gunPar[0].get_transform().get_localPosition().y, 0f));
                this._gunPar[1].get_transform().set_localPosition(new Vector3(400f, this._gunPar[1].get_transform().get_localPosition().y, 0f));
            }
            else if (this._iType == CutInType.FriendOnly)
            {
                this._setParticlePanel(FleetType.Friend, cutInCamera.get_transform());
                base.get_transform().set_position(cutInCamera.get_transform().get_position());
                this._uiPanel[0].get_transform().set_localPosition(Vector3.get_zero());
                this._uiAirObjF[0].get_transform().set_localPosition(new Vector3(-280f, 0f, 0f));
                this._gunPar[0].get_transform().set_localPosition(new Vector3(0f, this._gunPar[0].get_transform().get_localPosition().y, 0f));
                this._cloudPanel[1].SetActive(false);
            }
            else if (this._iType == CutInType.EnemyOnly)
            {
            }
            for (int i = 0; i < 2; i++)
            {
                this._cloudPanel[i].get_transform().GetComponent <Animation>().Play();
                if (this._cloudParPanel[i] != null)
                {
                    this._cloudPar[i].Play();
                }
            }
            this._playAircraft();
            this._playGunParticle();
            Animation component = base.get_transform().GetComponent <Animation>();

            component.Stop();
            component.Play("AerialStartPhase1_1");
            for (int j = 0; j < 2; j++)
            {
                this._baseMoveTo(new Vector3(this._uiPanel[j].get_transform().get_localPosition().x, 0f, this._uiPanel[j].get_transform().get_localPosition().z), 1.2f, 0.5f, iTween.EaseType.easeOutBack, string.Empty, this._uiPanel[j].get_transform());
            }
        }