Пример #1
0
        public IEnumerator NonDeckLose()
        {
            Dictionary <int, MapAreaModel> area             = StrategyTopTaskManager.GetLogicManager().Area;
            RebellionWinLoseAnimation      winloseAnimation = Util.Instantiate(Resources.Load("Prefabs/StrategyPrefab/Rebellion/RebellionWinLose") as GameObject, StrategyTopTaskManager.Instance.UIModel.OverView.gameObject).GetComponent <RebellionWinLoseAnimation>();

            yield return(winloseAnimation.StartAnimation(isWin: false));

            int areaID = StrategyRebellionTaskManager.RebellionArea;

            Object.Destroy(winloseAnimation);
            bool      isShipExist = StrategyTopTaskManager.GetLogicManager().Area[areaID].GetDecks().Length > 0;
            ShipModel fShip       = null;

            if (isShipExist)
            {
                fShip = StrategyTopTaskManager.GetLogicManager().Area[areaID].GetDecks()[0].GetFlagShip();
            }
            StrategyTopTaskManager.Instance.GetAreaMng().setShipMove(isShipExist, fShip);
            Dictionary <int, MapAreaModel> beforeAreas = StrategyTopTaskManager.GetLogicManager().Area;

            int[] beforeIDs = StrategyAreaManager.DicToIntArray(beforeAreas);
            StrategyTaskManager.GetStrategyRebellion().GetRebellionManager().NotGoRebellion();
            StrategyTopTaskManager.CreateLogicManager();
            if (Server_Common.Utils.IsGameOver())
            {
                StrategyTopTaskManager.Instance.GameOver();
                yield break;
            }
            Dictionary <int, MapAreaModel> afterAreas = StrategyTopTaskManager.GetLogicManager().Area;

            int[] afterIDs = StrategyAreaManager.DicToIntArray(afterAreas);
            StrategyTopTaskManager.Instance.GetAreaMng().MakeTogetherCloseTilesList(areaID, beforeIDs, afterIDs);
            setActiveRedMask(isActive: false);
            if (SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetFlagShip() != null)
            {
                StrategyTopTaskManager.Instance.UIModel.Character.ChangeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck);
            }
            StrategyTopTaskManager.Instance.ShipIconManager.setShipIconsState();
            StartCoroutine(StrategyTopTaskManager.Instance.GetAreaMng().CloseArea(areaID, delegate
            {
                this.DelayActionCoroutine(this.StartCoroutine(this.ShowLoseGuide()), delegate
                {
                    StrategyTopTaskManager.Instance.GetInfoMng().MoveScreenIn(null);
                    if (StrategyTopTaskManager.GetLogicManager().GetRebellionAreaList().Count > 0)
                    {
                        StrategyRebellionTaskManager.checkRebellionArea();
                        StrategyTaskManager.ReqMode(StrategyTaskManager.StrategyTaskManagerMode.Rebellion);
                    }
                    else
                    {
                        StrategyTopTaskManager.GetTurnEnd().isRebellion = false;
                        SoundUtils.PlayBGM(BGMFileInfos.Strategy, isLoop: true);
                        StrategyTaskManager.ReqMode(StrategyTaskManager.StrategyTaskManagerMode.StrategyTaskManagerMode_ST);
                    }
                });
            }));
            Close();
            StrategyTaskManager.GetStrategyRebellion().Termination();
            yield return(null);
        }
Пример #2
0
 public IEnumerator Play()
 {
     GetComponent <UIPanel>().alpha = 1f;
     _anime.Stop();
     _anime.Play("Marriage1");
     SoundUtils.PlayBGM(BGMFileInfos.Kekkon, isLoop: false);
     yield return(new WaitForEndOfFrame());
 }
 public void Play(Action callback)
 {
     this._isAnimation = true;
     this._callback    = callback;
     this._setEndTxt();
     this._createHistoryLabel();
     this._animation.Stop();
     this._animation.Play((!this._isClear) ? "EndStartGO" : "EndStart");
     if (this._isClear)
     {
         SoundUtils.PlaySE(SEFIleInfos.ClearAAA, delegate
         {
             SoundUtils.PlayBGM((BGMFileInfos)211, true);
         });
     }
 }
    private IEnumerator Start()
    {
        UserInterfacePortManager.ReleaseUtils.OverwriteCheck();
        mStartAt = GetStartAt();
        Stopwatch stopWatch = new Stopwatch();

        stopWatch.Reset();
        stopWatch.Start();
        SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
        mKeyController           = new KeyControl();
        mAudioClip_SE002         = SoundFile.LoadSE(SEFIleInfos.SE_002);
        mAudioClip_CommonCancel1 = SoundFile.LoadSE(SEFIleInfos.CommonCancel1);
        mUIItemListManager.SetOnBackListener(OnItemListBack);
        mUIItemListManager.SetOnSwitchItemStoreListener(OnSwitchToItemStore);
        mUIItemListManager.SetKeyController(null);
        mUIItemStoreManager.SetOnBackListener(OnItemStoreBackListener);
        mUIItemStoreManager.SetOnSwitchItemListListener(OnSwitchToItemList);
        mUIItemStoreManager.SetKeyController(null);
        mUIItemAkashi.SetOnHiddenCallBack(OnAkashiHidenListener);
        int bgmId = 101;

        switch (mStartAt)
        {
        case StartAt.ItemList:
            mUIItemListManager.SetActive(isActive: true);
            mUIItemStoreManager.SetActive(isActive: false);
            mTransform_SwitchViewRoot.transform.localPosition = new Vector3(0f, 0f, 0f);
            bgmId = itemListManager.UserInfo.GetPortBGMId(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID);
            mUIItemListManager.Initialize(itemListManager);
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.CircleUpdateInfo(itemListManager);
            }
            break;

        case StartAt.ItemStore:
            mUIItemListManager.SetActive(isActive: false);
            mUIItemStoreManager.SetActive(isActive: true);
            mTransform_SwitchViewRoot.transform.localPosition = new Vector3(-960f, 0f, 0f);
            bgmId = itemStoreManager.UserInfo.GetPortBGMId(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID);
            mUIItemStoreManager.Initialize(itemStoreManager);
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.CircleUpdateInfo(itemStoreManager);
            }
            break;
        }
        mAudioClip_SceneBGM = SoundFile.LoadBGM((BGMFileInfos)bgmId);
        stopWatch.Stop();
        if (RetentionData.GetData() != null)
        {
            RetentionData.GetData().Clear();
        }
        for (int frame = 0; frame < stopWatch.Elapsed.Milliseconds / 60; frame++)
        {
            yield return(new WaitForEndOfFrame());
        }
        SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(delegate
        {
            SoundUtils.PlayBGM(this.mAudioClip_SceneBGM, isLoop: true);
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            this.mUIItemAkashi.SetKeyController(this.mKeyController);
            this.mUIItemAkashi.Show();
            this.mUIItemAkashi.SetClickable(clickable: true);
            this.DelayAction(0.2f, delegate
            {
                ShipUtils.PlayPortVoice(4);
            });
            this.ChangeState(State.Akashi, popStack: false);
        });
    }
Пример #5
0
 public void PlayBGM()
 {
     SoundUtils.PlayBGM((BGMFileInfos)4, isLoop: true);
 }