Exemple #1
0
 public void PlayVoice(DeckModel deck)
 {
     if (!isEnsei(deck) && !isTettai(deck) && deck.GetFlagShip() != null)
     {
         ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2);
     }
 }
Exemple #2
0
 public void PlayVoice(EscortDeckModel deck)
 {
     if (deck.GetFlagShip() != null)
     {
         ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2);
     }
 }
 public new void ChangeButtonEL(GameObject obj)
 {
     if (!isEnd)
     {
         int        bannerIndex = TaskOrganizeTop.BannerIndex;
         int        memId       = ship.MemId;
         List <int> list        = new List <int>();
         list.Add(memId);
         List <int>  list2 = list;
         ShipModel[] ships = OrganizeTaskManager.Instance.GetTopTask().currentDeck.GetShips();
         if (bannerIndex - 1 < ships.Length)
         {
             list2.Add(ships[bannerIndex - 1].MemId);
         }
         if (!EscortOrganizeTaskManager.GetEscortManager().ChangeOrganize(OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), bannerIndex - 1, memId))
         {
             Debug.Log("EROOR: ChangeOrganize");
             return;
         }
         detailManager.Close();
         SoundUtils.PlaySE(SEFIleInfos.SE_003);
         EscortOrganizeTaskManager._clsList.BackListEL(null, isForce: true);
         EscortOrganizeTaskManager._clsTop.UpdateAllBannerByChangeShip();
         OrganizeTaskManager.Instance.GetListTask().UpdateList();
         ShipUtils.PlayShipVoice(ship, 13);
         setChangePhase("top");
     }
 }
 protected override void SetShipInfos(ShipModel_BattleAll model)
 {
     SetShipName(model.Name);
     SetShipBannerTexture(ShipUtils.LoadBannerTextureInTacticalSituation(model), model.DamagedFlgEnd, model.DmgStateEnd, model.IsEscape());
     SetShipIcons(model.DmgStateEnd, model.IsGroundFacility(), model.IsEscape());
     SetHPSliderValue(model.HpEnd, model.MaxHp);
 }
Exemple #5
0
        public override void Play(Action callback)
        {
            ObserverActionQueue observerAction = BattleTaskManager.GetObserverAction();

            observerAction.Executions();
            BattleCutInEffectCamera cutInEffectCamera = BattleTaskManager.GetBattleCameras().cutInEffectCamera;

            cutInEffectCamera.isCulling = true;
            base.get_transform().set_localScale(Vector3.get_one());
            this._actCallback = callback;
            base.GetComponent <UIPanel>().widgetsAreStatic = false;
            if (this._iList == ProdTorpedoCutIn.AnimationList.None)
            {
                this.onAnimationFinishedAfterDiscard();
                return;
            }
            base.Play(this._iList, callback);
            if (this._iList == ProdTorpedoCutIn.AnimationList.ProdTorpedoCutIn || this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInFriend)
            {
                ShipUtils.PlayTorpedoVoice(this.getTorpedoCutInShip(this._clsRaigeki, true));
            }
            else if (this._iList == ProdTorpedoCutIn.AnimationList.TorpedoCutInEnemy)
            {
            }
        }
        public BtlCut_Live2D PlayShipVoice(int nVoiceNum)
        {
            Live2DModel instance = SingletonMonoBehaviour <Live2DModel> .Instance;

            ShipUtils.PlayShipVoice(BattleCutManager.GetMapManager().Deck.GetFlagShip(), nVoiceNum);
            return(this);
        }
        private void ChangePartnerShip(int selectedShipCursor)
        {
            string text = string.Format("{0:000}", this._listStarterShips.get_Item((int)this._iStarterType).get_Item(selectedShipCursor).GetGraphicsMstId());

            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Background).mainTexture = (Resources.Load("Textures/Startup/PartnerShip/startup_c" + text + "_txtArea") as Texture);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Background).localSize   = new Vector2(740f, 382f);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().localPositionX(this._shipLocate.get_Item(this._listStarterShips.get_Item((int)this._iStarterType).get_Item(selectedShipCursor).MstId).x);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().localPositionY(this._shipLocate.get_Item(this._listStarterShips.get_Item((int)this._iStarterType).get_Item(selectedShipCursor).MstId).y);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().LTCancel();
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().localScaleOne();
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().LTScale(Vector3.get_one() * 1.05f, 5f).setEase(LeanTweenType.easeOutSine).setLoopPingPong();
            Vector3 localPosition = this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().get_localPosition();

            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().localPositionX(1000f);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().LTMoveLocal(localPosition, 0.2f).setEase(LeanTweenType.easeOutSine).setOnComplete(delegate
            {
                this._isMove = false;
            });
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(this._listStarterShips.get_Item((int)this._iStarterType).get_Item(selectedShipCursor).GetGraphicsMstId(), 9);

            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).MakePixelPerfect();
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Girl).get_transform().set_localScale(Vector3.get_one());
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).get_transform().localPositionY(155f);
            Vector3 localPosition2 = this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).get_transform().get_localPosition();

            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).get_transform().localPositionY(135f);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).get_transform().LTMoveLocal(localPosition2, 0.2f).setEase(LeanTweenType.easeOutSine);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).mainTexture = (Resources.Load("Textures/Startup/PartnerShip/startup_c" + text + "_txt") as Texture);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).localSize   = Defines.STARTER_PARTNER_TEXT_SIZE.get_Item((int)this._iStarterType).get_Item(selectedShipCursor);
            this._dicShipParts.get_Item(CtrlPartnerSelect.ShipPartsIndex.Info).get_transform().set_localScale(Vector3.get_one() * 0.8f);
            ShipUtils.PlayShipVoice(this._listStarterShips.get_Item((int)this._iStarterType).get_Item(selectedShipCursor), 26);
            this._isMove = true;
        }
Exemple #8
0
        public void AddShipInfo(FleetType type, ShipModel_Defender ship)
        {
            bool isAfter = false;

            if (ship.DmgStateBefore == DamageState_Battle.Tyuuha || ship.DmgStateBefore == DamageState_Battle.Taiha || ship.DmgStateBefore == DamageState_Battle.Gekichin)
            {
                isAfter = true;
            }
            if (type == FleetType.Friend)
            {
                this._listShipDefenderF.Add(ship);
                this._countF = this._listShipDefenderF.get_Count();
                this._listShipFriend.get_Item(this._countF - 1).mainTexture = ShipUtils.LoadTexture(ship, isAfter);
                this._listShipFriend.get_Item(this._countF - 1).MakePixelPerfect();
                this._listShipFriend.get_Item(this._countF - 1).get_transform().set_localPosition(ShipUtils.GetShipOffsPos(ship, ship.DmgStateBefore, MstShipGraphColumn.CutIn));
            }
            else
            {
                this._listShipDefenderE.Add(ship);
                this._countE = this._listShipDefenderE.get_Count();
                this._listShipEnemy.get_Item(this._countE - 1).mainTexture = ShipUtils.LoadTexture(ship, isAfter);
                this._listShipEnemy.get_Item(this._countE - 1).MakePixelPerfect();
                this._listShipEnemy.get_Item(this._countE - 1).get_transform().set_localPosition(ShipUtils.GetShipOffsPos(ship, ship.DmgStateBefore, MstShipGraphColumn.CutIn));
            }
            this._dicIsCutIn.set_Item(type, true);
        }
Exemple #9
0
        public IEnumerator ChangeFinalShip(ShipModel ship, EndingStaffRoll StaffRoll)
        {
            ShipUtils.StopShipVoice();
            Live2DRender.ChangeCharacter(ship, -1, isDamaged: false);
            TweenPos.to   = new Vector3(400f, 0f, 0f);
            TweenPos.from = new Vector3(1200f, 0f, 0f);
            while (!StaffRoll.isFinishRoll)
            {
                yield return(null);
            }
            if (ship.IsMarriage())
            {
                SakuraPar.Play();
            }
            else
            {
                SakuraPar.Stop();
            }
            TweenPos.onFinished.Clear();
            TweenPos.PlayForward();
            TweenPos.duration = 2f;
            Live2DRender.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f);
            Live2DRender.transform.AddLocalPositionY(-120f);
            this.DelayAction(TweenPos.duration, delegate
            {
                this.isShipChanging = false;
            });
            yield return(new WaitForEndOfFrame());

            SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Secret);

            SingletonMonoBehaviour <Live2DModel> .Instance.Play();
        }
Exemple #10
0
 private void _playExplosionParticle(int num)
 {
     if (num == 0)
     {
         ShipUtils.PlayAircraftCutInVoice(_ship);
     }
 }
        private bool InitFriendFleetAdvent(object data)
        {
            ((Component)_dicPSClouds[FleetType.Friend]).SetActive(isActive: true);
            _dicPSClouds[FleetType.Friend].Play();
            BattleFieldCamera cam          = BattleTaskManager.GetBattleCameras().fieldCameras[0];
            UIBattleShip      uIBattleShip = BattleTaskManager.GetBattleShips().dicFriendBattleShips[0];
            Vector3           position     = BattleTaskManager.GetBattleField().dicFleetAnchor[FleetType.Friend].position;
            Vector3           pointOfGaze  = uIBattleShip.pointOfGaze;

            position.y = pointOfGaze.y;
            ShipUtils.PlayBattleStartVoice(uIBattleShip.shipModel);
            cam.ReqViewMode(CameraActor.ViewMode.RotateAroundObject);
            cam.SetRotateAroundObjectCamera(position, BattleDefines.FLEET_ADVENT_START_CAM_POS[0], -10f);
            List <float> rotDst = CalcCloseUpCamDist(cam.rotateDistance, 30f);

            cam.transform.LTValue(cam.rotateDistance, rotDst[0], 1f).setEase(BattleDefines.FLEET_ADVENT_FLEET_CLOSEUP_EASEING_TYPE).setOnUpdate(delegate(float x)
            {
                cam.rotateDistance = x;
            })
            .setOnComplete((Action) delegate
            {
                cam.transform.LTValue(cam.rotateDistance, rotDst[1], 1f).setEase(BattleDefines.FLEET_ADVENT_FLEET_CLOSEUP_EASEING_TYPE).setOnUpdate(delegate(float x)
                {
                    cam.rotateDistance = x;
                })
                .setOnComplete((Action) delegate
                {
                    EndPhase(BattleUtils.NextPhase(BattlePhase.FleetAdvent));
                });
            });
            return(false);
        }
 public void change_2_SUPPLY_PROCESS(SupplyType supplyType)
 {
     if (_status != 0 && _status != ScreenStatus.RIGHT_PAIN_WORK)
     {
         return;
     }
     _status = ScreenStatus.SUPPLY_PROCESS;
     _otherListParent.LockControl();
     _commonDeckSwitchManager.keyControlEnable = false;
     if (supplyType == SupplyType.All)
     {
         ShipModel model;
         if (isNotOther() && _currentDeck.GetShipCount() == getSelectedShipList().Count)
         {
             int mstId = _currentDeck.GetFlagShip().MstId;
             model = _currentDeck.GetFlagShip();
         }
         else
         {
             List <ShipModel> selectedShipList = getSelectedShipList();
             int index  = UnityEngine.Random.Range(0, selectedShipList.Count);
             int mstId2 = selectedShipList[index].MstId;
             model = selectedShipList[index];
         }
         ShipUtils.PlayShipVoice(model, 27);
     }
     SetShipSelectFocus(focused: false);
     _rightPane.LostFocus();
     _rightPane.SetEnabled(enabled: false);
     _rightPane.DoWindowOpenAnimation(supplyType);
     Supply(supplyType);
 }
        private bool InitFriendFleetAdvent(object data)
        {
            this._dicPSClouds.get_Item(FleetType.Friend).SetActive(true);
            this._dicPSClouds.get_Item(FleetType.Friend).Play();
            BattleFieldCamera cam          = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0);
            UIBattleShip      uIBattleShip = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Item(0);
            Vector3           position     = BattleTaskManager.GetBattleField().dicFleetAnchor.get_Item(FleetType.Friend).get_position();

            position.y = uIBattleShip.pointOfGaze.y;
            ShipUtils.PlayBattleStartVoice(uIBattleShip.shipModel);
            cam.ReqViewMode(CameraActor.ViewMode.RotateAroundObject);
            cam.SetRotateAroundObjectCamera(position, BattleDefines.FLEET_ADVENT_START_CAM_POS.get_Item(0), -10f);
            List <float> rotDst = this.CalcCloseUpCamDist(cam.rotateDistance, 30f);

            cam.get_transform().LTValue(cam.rotateDistance, rotDst.get_Item(0), 1f).setEase(BattleDefines.FLEET_ADVENT_FLEET_CLOSEUP_EASEING_TYPE).setOnUpdate(delegate(float x)
            {
                cam.rotateDistance = x;
            }).setOnComplete(delegate
            {
                cam.get_transform().LTValue(cam.rotateDistance, rotDst.get_Item(1), 1f).setEase(BattleDefines.FLEET_ADVENT_FLEET_CLOSEUP_EASEING_TYPE).setOnUpdate(delegate(float x)
                {
                    cam.rotateDistance = x;
                }).setOnComplete(delegate
                {
                    this.EndPhase(BattleUtils.NextPhase(BattlePhase.FleetAdvent));
                });
            });
            return(false);
        }
Exemple #14
0
        public void ShowTwinOther()
        {
            _twinPanel.transform.localPosition = Vector3.zero;
            _otherBg.transform.localPosition   = Vector3.zero;
            _twinPanel.gameObject.SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _twinPanel.gameObject, string.Empty);
            _otherBg.gameObject.SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _otherBg.gameObject, string.Empty);
            OrganizeTaskManager.GetDialogPopUp().Open(_twinPanel.gameObject, 0f, 0f, 1f, 1f);
            int num      = Random.Range(0, 2);
            int voiceNum = -1;

            switch (num)
            {
            case 0:
                voiceNum = 15;
                break;

            case 1:
                voiceNum = 16;
                break;
            }
            ShipUtils.PlayPortVoice(voiceNum);
            setIndex2 = 0;
            State     = TenderState.Twin;
            setTwinUseDialog();
            updateTwinBtn();
        }
Exemple #15
0
 protected void PlayDamageVoice(UIBattleShip ship, DamagedStates iStates)
 {
     if (iStates != DamagedStates.Tyuuha && iStates != DamagedStates.Taiha)
     {
         ShipUtils.PlayMildCaseVoice(this._clsHougekiModel.Defender);
     }
 }
 public void DetailEL(GameObject obj)
 {
     if (OrganizeTaskManager.Instance.GetListTask().isRun || !CheckBtnEnabled())
     {
         return;
     }
     TaskOrganizeTop.BannerIndex = number;
     if (IsSet)
     {
         OrganizeTaskManager.Instance.GetTopTask().setChangePhase("detail");
         OrganizeTaskManager.Instance.GetDetailTask().Show(_ship);
         if (_ship != null)
         {
             ShipUtils.PlayShipVoice(_ship, App.rand.Next(2, 4));
         }
     }
     else
     {
         OrganizeTaskManager.Instance.GetTopTask().setChangePhase("list");
         OrganizeTaskManager.Instance.GetListTask().Show(IsSet);
     }
     SoundUtils.PlaySE(SEFIleInfos.SE_002);
     OrganizeTaskManager.Instance.GetTopTask().UpdateAllSelectBanner();
     OrganizeTaskManager.Instance.GetTopTask().setControlState();
 }
Exemple #17
0
 private void PlayBackTouch()
 {
     if (!TouchAnimation.isPlaying)
     {
         int num = (BackRubCount != 0) ? 4 : 3;
         BackRubCount++;
         ShipUtils.PlayShipVoice(StrategyShipCharacter.nowShipModel, num);
         PlayJumpAnimation(1);
         int  lov  = StrategyShipCharacter.nowShipModel.Lov;
         bool arg  = false;
         bool arg2 = false;
         StrategyShipCharacter.nowShipModel.LovAction(1, num);
         if (StrategyShipCharacter.nowShipModel.Lov > lov)
         {
             arg = true;
         }
         if (StrategyShipCharacter.nowShipModel.Lov < lov)
         {
             arg2 = true;
         }
         if (OnBackTouch != null)
         {
             OnBackTouch(arg, arg2, arg3: true);
         }
     }
 }
 private void Success_Voice()
 {
     if (this._isEnabled && base.get_transform().get_parent().get_parent().get_name() == "TaskArsenalMain")
     {
         ShipUtils.PlayShipVoice(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip(), 26);
     }
 }
        public void AddShipInfo(FleetType type, ShipModel_Defender ship)
        {
            bool isAfter = false;

            if (ship.DmgStateBefore == DamageState_Battle.Tyuuha || ship.DmgStateBefore == DamageState_Battle.Taiha || ship.DmgStateBefore == DamageState_Battle.Gekichin)
            {
                isAfter = true;
            }
            if (type == FleetType.Friend)
            {
                _listShipDefenderF.Add(ship);
                _countF = _listShipDefenderF.Count;
                _listShipFriend[_countF - 1].mainTexture = ShipUtils.LoadTexture(ship, isAfter);
                _listShipFriend[_countF - 1].MakePixelPerfect();
                _listShipFriend[_countF - 1].transform.localPosition = ShipUtils.GetShipOffsPos(ship, ship.DmgStateBefore, MstShipGraphColumn.CutIn);
            }
            else
            {
                _listShipDefenderE.Add(ship);
                _countE = _listShipDefenderE.Count;
                _listShipEnemy[_countE - 1].mainTexture = ShipUtils.LoadTexture(ship, isAfter);
                _listShipEnemy[_countE - 1].MakePixelPerfect();
                _listShipEnemy[_countE - 1].transform.localPosition = ShipUtils.GetShipOffsPos(ship, ship.DmgStateBefore, MstShipGraphColumn.CutIn);
            }
            _dicIsCutIn[type] = true;
        }
        public void ShowTwinOther()
        {
            this._twinPanel.get_transform().set_localPosition(Vector3.get_zero());
            this._otherBg.get_transform().set_localPosition(Vector3.get_zero());
            this._twinPanel.get_gameObject().SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._twinPanel.get_gameObject(), string.Empty);
            this._otherBg.get_gameObject().SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._otherBg.get_gameObject(), string.Empty);
            OrganizeTaskManager.GetDialogPopUp().Open(this._twinPanel.get_gameObject(), 0f, 0f, 1f, 1f);
            int num      = Random.Range(0, 2);
            int voiceNum = -1;
            int num2     = num;

            if (num2 != 0)
            {
                if (num2 == 1)
                {
                    voiceNum = 16;
                }
            }
            else
            {
                voiceNum = 15;
            }
            ShipUtils.PlayPortVoice(voiceNum);
            this.setIndex2 = 0;
            this.State     = OrganizeTender.TenderState.Twin;
            this.setTwinUseDialog();
            this.updateTwinBtn();
        }
        private bool InitMoveCameraTo2D(object data)
        {
            BattleFieldCamera       cam                  = BattleTaskManager.GetBattleCameras().fieldCameras.get_Item(0);
            BattleShips             battleShips          = BattleTaskManager.GetBattleShips();
            ProdDetectionStartCutIn pdsc                 = ProdDetectionStartCutIn.Instantiate(BattleTaskManager.GetPrefabFile().prefabProdDetectionStartCutIn.GetComponent <ProdDetectionStartCutIn>(), BattleTaskManager.GetBattleCameras().cutInCamera.get_transform());
            ShipModel_Battle        detectionPrimaryShip = ShipUtils.GetDetectionPrimaryShip(this._clsSakuteki.planes_f, true);
            UIBattleShip            uIBattleShip         = (detectionPrimaryShip == null) ? battleShips.flagShipFriend : battleShips.dicFriendBattleShips.get_Item(detectionPrimaryShip.Index);
            Vector3 vector           = Mathe.NormalizeDirection(uIBattleShip.pointOfGaze, Vector3.get_zero()) * 30f;
            Vector3 fixChasingCamera = new Vector3(uIBattleShip.pointOfGaze.x, uIBattleShip.pointOfGaze.y, uIBattleShip.pointOfGaze.z + vector.z);

            cam.pointOfGaze = uIBattleShip.pointOfGaze;
            cam.ReqViewMode(CameraActor.ViewMode.FixChasing);
            cam.SetFixChasingCamera(fixChasingCamera);
            Vector3   endCamPos = new Vector3(uIBattleShip.pointOfGaze.x, 50f, uIBattleShip.pointOfGaze.z + vector.z * 6f);
            Transform transform = uIBattleShip.get_transform();
            Vector3   position  = BattleTaskManager.GetBattleShips().dicFriendBattleShips.get_Item(0).get_transform().get_position();

            this._psDetectionRipple = Util.Instantiate(ParticleFile.Load(ParticleFileInfos.BattlePSDetectionRipple), null, false, false).GetComponent <ParticleSystem>();
            this._psDetectionRipple.get_transform().set_parent(transform);
            this._psDetectionRipple.get_transform().set_position(new Vector3(position.x, position.y + 0.01f, position.z));
            this._psDetectionRipple.Play();
            pdsc.Play().Subscribe(delegate(bool _)
            {
                cam.get_transform().LTMove(endCamPos, 1.95f).setEase(LeanTweenType.easeInOutCubic);
                Mem.DelComponentSafe <ProdDetectionStartCutIn>(ref pdsc);
            });
            return(false);
        }
Exemple #22
0
        public void ProcessChangeSlotItem(int slotIndex, SlotitemModel slotItem, int voiceType, bool isExSlot)
        {
            if (status != ScreenStatus.MODE_SOUBI_HENKOU_PREVIEW)
            {
                return;
            }
            mRemodelManager.GetSlotitemInfoToChange(focusedShipModel.MemId, slotItem.MemId, slotIndex);
            SlotSetChkResult_Slot slotSetChkResult_Slot = isExSlot ? mRemodelManager.IsValidChangeSlotitemEx(focusedShipModel.MemId, slotItem.MemId) : mRemodelManager.IsValidChangeSlotitem(focusedShipModel.MemId, slotItem.MemId, slotIndex);
            bool flag = false;

            switch (slotSetChkResult_Slot)
            {
            case SlotSetChkResult_Slot.Ok:
            case SlotSetChkResult_Slot.OkBauxiteUse:
            case SlotSetChkResult_Slot.OkBauxiteUseHighCost:
                flag = true;
                break;

            case SlotSetChkResult_Slot.NgBauxiteShort:
                AnimateBauxite(ngBauxiteShortMessage);
                break;

            case SlotSetChkResult_Slot.NgBausiteShortHighCost:
                AnimateBauxite(ngBausiteShortHighCostMessage);
                break;
            }
            SlotSetChkResult_Slot slotSetChkResult_Slot2 = isExSlot ? mRemodelManager.ChangeSlotitemEx(focusedShipModel.MemId, slotItem.MemId) : mRemodelManager.ChangeSlotitem(focusedShipModel.MemId, slotItem.MemId, slotIndex);

            if (flag)
            {
                bool flag2 = true;
                switch (slotSetChkResult_Slot2)
                {
                case SlotSetChkResult_Slot.OkBauxiteUse:
                    AnimateBauxite(okBauxiteUseMessage);
                    break;

                case SlotSetChkResult_Slot.OkBauxiteUseHighCost:
                    AnimateBauxite(okBauxiteUseHighCostMessage);
                    break;

                default:
                    flag2 = false;
                    break;

                case SlotSetChkResult_Slot.Ok:
                    break;
                }
                if (flag2)
                {
                    ShipUtils.PlayShipVoice(focusedShipModel, voiceType);
                }
                if (SingletonMonoBehaviour <UIPortFrame> .exist())
                {
                    SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(mRemodelManager);
                }
            }
            Back2SoubiHenkou();
        }
Exemple #23
0
        private void setShipTexture()
        {
            int num = (_shipModelMst == null) ? 1 : _shipModelMst.GetGraphicsMstId();

            _uiShip.mainTexture = ShipUtils.LoadTexture(num, 9);
            _uiShip.MakePixelPerfect();
            _uiShip.transform.localPosition = Util.Poi2Vec(new ShipOffset(num).GetFace(damaged: false));
        }
Exemple #24
0
 private void PlayVoice()
 {
     ShipUtils.PlayShipVoice(mTargetShipModelMst, (UnityEngine.Random.Range(0, 2) != 0) ? 10 : 9);
     if (_isSuperSucessed)
     {
         waitAndVoiceCoroutine = StartCoroutine(WaitAndVoice());
     }
 }
Exemple #25
0
 public void ShowInItemGet(Action onFinished)
 {
     Observable.Timer(TimeSpan.FromSeconds(0.75)).Subscribe(delegate(long _)
     {
         ShipUtils.PlayShipVoice(this.shipModel, 26);
     });
     this.HideDelayAfterDisplay(onFinished);
 }
Exemple #26
0
 private void PlayPortInVoice(ShipModelMst shipModel)
 {
     if (App.rand.Next(0, 2) == 0)
     {
         int voiceNum = App.rand.Next(2, 4);
         ShipUtils.PlayShipVoice(shipModel, voiceNum);
     }
 }
 public void PlayVoice(DeckModel deck)
 {
     if (this.isEnsei(deck) || this.isTettai(deck) || deck.GetFlagShip() == null)
     {
         return;
     }
     ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2);
 }
        public IEnumerator Play(int MstID, Action OnFinished)
        {
            panel.alpha = 1f;
            MotionList  = new Dictionary <int, Live2DModel.MotionType>();
            MotionList.Add(9, Live2DModel.MotionType.Love2);
            MotionList.Add(37, Live2DModel.MotionType.Port);
            MotionList.Add(1, Live2DModel.MotionType.Port);
            MotionList.Add(33, Live2DModel.MotionType.Port);
            MotionList.Add(96, Live2DModel.MotionType.Secret);
            MotionList.Add(43, Live2DModel.MotionType.Port);
            MotionList.Add(54, Live2DModel.MotionType.Battle);
            MotionList.Add(55, Live2DModel.MotionType.Port);
            MotionList.Add(56, Live2DModel.MotionType.Secret);
            MotionList.Add(94, Live2DModel.MotionType.Secret);
            MotionList.Add(46, Live2DModel.MotionType.Secret);
            if (MotionList.ContainsKey(MstID))
            {
                Live2DModel.MotionType motionType = MotionList[MstID];
            }
            SoundUtils.StopBGM();
            SingletonMonoBehaviour <FadeCamera> .Instance.SetTransitionRule(FadeCamera.TransitionRule.NONE);

            ShipModelMst model = new ShipModelMst(MstID);

            ShipCharacter.ChangeCharacter(model);
            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            SoundUtils.PlaySE(SEFIleInfos.RewardGet2, null);
            WhiteMaskTweenAlpha.ResetToBeginning();
            WhiteMaskTweenAlpha.PlayForward();
            WhiteMaskTweenAlpha.SetOnFinished(delegate
            {
                throw new NotImplementedException("‚È‚É‚±‚ê");
                // SingletonMonoBehaviour<Live2DModel>.Instance.Play(base._003Cmotion_003E__0, null);

                ShipUtils.PlayShipVoice(model, 1);
            });
            yield return(new WaitForSeconds(6f));

            BGTweenAlpha.ResetToBeginning();
            BGTweenAlpha.PlayForward();
            CameraZoomTween.ResetToBeginning();
            CameraZoomTween.PlayForward();
            yield return(new WaitForSeconds(4.5f));

            WhiteMaskTweenAlpha.onFinished.Clear();
            WhiteMaskTweenAlpha.PlayReverse();
            yield return(new WaitForSeconds(WhiteMaskTweenAlpha.duration + 2f));

            TweenColor.Begin(WhiteMaskTweenAlpha.gameObject, 1f, Color.black);
            yield return(new WaitForSeconds(1.5f));

            OnFinished?.Invoke();
        }
 private IEnumerator PlayCompleteVoiceWaitForFlagOn(ShipModel shipModel)
 {
     while (!isCompleteVoicePlayable)
     {
         yield return(new WaitForEndOfFrame());
     }
     ShipUtils.PlayShipVoice(shipModel, 5);
     cor = null;
 }
Exemple #30
0
 protected virtual void PlayShipAnimation(UIBattleShip ship, UIBattleShip.AnimationName iName, float delay)
 {
     Observable.Timer(TimeSpan.FromSeconds((double)delay)).Subscribe(delegate(long _)
     {
         SoundUtils.PlayShellingSE(this._listBattleShips.get_Item(0).shipModel);
         ShipUtils.PlayShellingVoive(ship.shipModel);
         ship.PlayShipAnimation(iName);
     });
 }