Exemplo n.º 1
0
        private void OnStartSuccessRevampAnimation(RevampContext context)
        {
            _isTop = true;
            UIRevampIcon revampIcon = Util.Instantiate(mPrefab_RevampIcon.gameObject, base.gameObject).GetComponent <UIRevampIcon>();

            revampIcon.Initialize(context.GetBeforeSlotItemInfo().MstId, context.GetBeforeSlotItemInfo().Level, mCameraProduction);
            revampIcon.StartRevamp(context.GetAfterSlotItemInfo().MstId, context.GetAfterSlotItemInfo().Level, context.GetAfterSlotItemInfo().Name, delegate
            {
                SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true;
                mRevampAkashi.ChangeBodyTo(UIRevampAkashi.BodyType.Normal);
                _isAnimation = false;
                string empty = string.Empty;
                PlayAkashiVoice(mAudioClip_308);
                empty += "[000000]改修成功しました。";
                empty += "\n";
                empty += $"[329ad6]{mRevampContext.GetAfterSlotItemInfo().Name}[-]";
                mParticleSystem_SuccessStars.Play(false);
                if (SingletonMonoBehaviour <UIPortFrame> .exist())
                {
                    SingletonMonoBehaviour <UIPortFrame> .Instance.isColliderEnabled = true;
                }
                TrophyUtil.Unlock_AlbumSlotNum();
                if (mRevampContext.IsModelChange())
                {
                    SoundUtils.PlaySE(mAudioClip_SE_023);
                }
                else
                {
                    SoundUtils.PlaySE(mAudioClip_SE_021);
                }
                KeyControl keyController = mRevampInfoBalloon.SayMessage(empty, delegate
                {
                    if (mRevampContext.ConsortShip != null)
                    {
                        mTransform_AssistantShipParent.DOLocalMove(mVector3_AssistantShipHideLocalPosition, 0.6f);
                    }
                    mRevampInfoBalloon.alpha = 1f;
                    UnityEngine.Object.Destroy(revampIcon.gameObject);
                    mRevampInfoBalloon.SayMessage("[000000]どの装備の改修を試みますか?");
                    mRevampManager.GetDetail(mRevampContext.RevampRecipe.RecipeId, mRevampContext.GetBeforeSlotItemInfo().MemId);
                    RevampRecipeModel[] recipes = mRevampManager.GetRecipes();
                    int num = 0;
                    RevampRecipeModel[] array = recipes;
                    foreach (RevampRecipeModel revampRecipeModel in array)
                    {
                        if (revampRecipeModel.RecipeId == mRevampContext.RevampRecipe.RecipeId)
                        {
                            break;
                        }
                        num++;
                    }
                    KeyControl keyController2 = (num > recipes.Length) ? ShowUIRevampRecipeList(0) : ShowUIRevampRecipeList(num);
                    ChangeFocusKeyController(keyController2);
                });
                ChangeFocusKeyController(keyController);
                mTransform_AssistantShipParent.DOLocalMove(mVector3_AssistantShipHideLocalPosition, 0.6f);
            });
        }
 private void compStartAnimation()
 {
     _uiPar.Stop();
     _uiPar.time = 0f;
     ((Component)_uiPar).gameObject.SetActive(false);
     _uiRareBG.alpha = 1f;
     _uiItem.alpha   = 1f;
     ((Component)_uiParticleComp).SetActive(isActive: true);
     _uiParticleComp.Play();
     ((Component)_uiParticleStar1).SetActive(isActive: true);
     _uiParticleStar1.Play();
     _anime.Stop();
     _anime.Play("comp_GetSlotItem");
     TrophyUtil.Unlock_AlbumSlotNum();
 }
 private void compStartAnimation()
 {
     this._uiPar.Stop();
     this._uiPar.set_time(0f);
     this._uiPar.get_gameObject().SetActive(false);
     this._uiRareBG.alpha = 1f;
     this._uiItem.alpha   = 1f;
     this._uiParticleComp.SetActive(true);
     this._uiParticleComp.Play();
     this._uiParticleStar1.SetActive(true);
     this._uiParticleStar1.Play();
     this._anime.Stop();
     this._anime.Play("comp_GetSlotItem");
     TrophyUtil.Unlock_AlbumSlotNum();
 }
Exemplo n.º 4
0
 private void OnBuyStart(ItemStoreModel itemStoreModel, int count)
 {
     if (CurrentState != State.ItemStoreBuyConfirm)
     {
         return;
     }
     if (mItemStoreManager.IsValidBuy(itemStoreModel.MstId, count))
     {
         int fuel  = mItemStoreManager.Material.Fuel;
         int ammo  = mItemStoreManager.Material.Ammo;
         int baux  = mItemStoreManager.Material.Baux;
         int steel = mItemStoreManager.Material.Steel;
         if (mItemStoreManager.BuyItem(itemStoreModel.MstId, count))
         {
             int fuel2  = mItemStoreManager.Material.Fuel;
             int ammo2  = mItemStoreManager.Material.Ammo;
             int baux2  = mItemStoreManager.Material.Baux;
             int steel2 = mItemStoreManager.Material.Steel;
             if (fuel != fuel2 || ammo != ammo2 || baux != baux2 || steel != steel2)
             {
                 TrophyUtil.Unlock_Material();
             }
             TrophyUtil.Unlock_AlbumSlotNum();
         }
         mUIItemStoreChildren.Refresh(mItemStoreManager.Items.ToArray());
         if (SingletonMonoBehaviour <UIPortFrame> .exist())
         {
             SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(mItemStoreManager);
         }
     }
     else if (mItemStoreManager.UserInfo.SPoint >= itemStoreModel.Price)
     {
         CommonPopupDialog.Instance.StartPopup("保有上限に達しています");
     }
     mUIItemStoreBuyConfirm.Close(null);
     mUIItemStoreBuyConfirm.SetKeyController(null);
     PopState();
 }
 private void compStartAnimation()
 {
     this._uiBG.set_enabled(false);
     this._isInput      = false;
     this._isPlayPhase1 = false;
     this._uiPar.Stop();
     this._uiPar.set_time(0f);
     this._uiPar.get_gameObject().SetActive(false);
     if (this._isEnabled)
     {
         this._uiRareBG.alpha = 1f;
         this._uiItem.alpha   = 1f;
         if (this._isArsenal)
         {
             this._uiParticleComp.SetActive(true);
             this._uiParticleComp.Play();
         }
         else
         {
             this._uiParticleStar1.SetActive(true);
             this._uiParticleStar2.SetActive(true);
             this._uiParticleStar1.Play();
             this._uiParticleStar2.Play();
         }
         this._anime.Stop();
         this._anime.Play("comp_GetSlotItem");
         TrophyUtil.Unlock_AlbumSlotNum();
     }
     else
     {
         this._anime.Stop();
         this._anime.Play("miss_GetSlotItem");
         this._missObj.SetActive(true);
         this._uiParticleMiss.Play();
     }
 }
Exemplo n.º 6
0
        private IEnumerator OnStartRevampCoroutine(UIRevampSetting calledObject)
        {
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.isColliderEnabled = false;
            }
            _isAnimation = true;
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            SoundUtils.PlaySE(mAudioClip_SE_020);
            RevampRecipeDetailModel revampRecipeDetail = mRevampManager.GetDetail(mRevampContext.RevampRecipe.RecipeId, mRevampContext.GetBeforeSlotItemInfo().MemId);

            revampRecipeDetail.Determined = calledObject.IsDetermined();
            SlotitemModel revampedSlotItemModel = mRevampManager.Revamp(revampRecipeDetail);
            List <int>    ids = new List <int>();

            ids.AddRange(TrophyUtil.Unlock_At_Revamp());
            ids.AddRange(TrophyUtil.Unlock_AlbumSlotNum());
            SingletonMonoBehaviour <TrophyManager> .Instance.UnlockTrophies(ids);

            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(mRevampManager);
            }
            if (revampedSlotItemModel != null)
            {
                mRevampContext.SetSuccess(success: true);
                mRevampContext.SetAfterSlotItemInfo(revampedSlotItemModel);
            }
            else
            {
                mRevampContext.SetSuccess(success: false);
            }
            UpdateInfo(mRevampManager);
            int       consortShipResourceId = -1;
            int       consortShipVoiceId    = -1;
            ShipModel consortShipModel      = mRevampManager.GetConsortShip(revampRecipeDetail, out consortShipResourceId, out consortShipVoiceId);

            if (consortShipModel != null)
            {
                int mstId = mRevampManager.UserInfo.GetDeck(mDeckId).GetShip(1).MstId;
                mTexture_AssistantShip.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(consortShipModel.GetGraphicsMstId(), (!consortShipModel.IsDamaged())? 9 : 10);

                mTexture_AssistantShip.MakePixelPerfect();
            }
            yield return(new WaitForEndOfFrame());

            calledObject.Hide(delegate
            {
                throw new NotImplementedException("なにこれ");
                //if (base._003CexistConsortShip_003E__6)
                //{
                //	this.mTransform_AssistantShipParent.DOLocalMove(this.mVector3_AssistantShipShowLocalPosition, 0.3f).OnComplete(delegate
                //	{
                //		ShipUtils.PlayShipVoice(consortShipModel, consortShipVoiceId);
                //	});
                //}

                this.ChangeFocusKeyController(null);
                UnityEngine.Object.Destroy(calledObject.gameObject);
                this.mRevampAkashi.ChangeBodyTo(UIRevampAkashi.BodyType.Making);
                this.mRevampInfoBalloon.SayMessage("[000000]改修中・・・[-]");
                this.OnStartRevampAnimation(this.mRevampContext);
            });
        }
Exemplo n.º 7
0
        private IEnumerator ReciveReward(IReward[] rewards)
        {
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            mModalCamera.Show();
            foreach (IReward reward in rewards)
            {
                if (reward is IReward_Materials)
                {
                    enumMaterialCategory[] fourMaterialsFilter = new enumMaterialCategory[5]
                    {
                        enumMaterialCategory.Bauxite,
                        enumMaterialCategory.Bull,
                        enumMaterialCategory.Fuel,
                        enumMaterialCategory.Steel,
                        enumMaterialCategory.Bauxite
                    };
                    enumMaterialCategory[] kitMaterialsFilter = new enumMaterialCategory[5]
                    {
                        enumMaterialCategory.Build_Kit,
                        enumMaterialCategory.Dev_Kit,
                        enumMaterialCategory.Repair_Kit,
                        enumMaterialCategory.Revamp_Kit,
                        enumMaterialCategory.Bauxite
                    };
                    List <IReward_Material> fourMaterials = new List <IReward_Material>();
                    List <IReward_Material> kitMaterials  = new List <IReward_Material>();
                    IReward_Materials       materials     = (IReward_Materials)reward;
                    IReward_Material[]      rewards2      = materials.Rewards;
                    foreach (IReward_Material material in rewards2)
                    {
                        if (fourMaterialsFilter.Contains(material.Type))
                        {
                            fourMaterials.Add(material);
                        }
                        else if (kitMaterialsFilter.Contains(material.Type))
                        {
                            kitMaterials.Add(material);
                        }
                    }
                    if (0 < fourMaterials.Count)
                    {
                        yield return(StartCoroutine(OnReciveRewardMaterials(fourMaterials.ToArray())));
                    }
                    if (0 < kitMaterials.Count)
                    {
                        foreach (IReward_Material kitMat in kitMaterials)
                        {
                            yield return(StartCoroutine(OnReciveRewardMaterials(new IReward_Material[1]
                            {
                                kitMat
                            })));
                        }
                    }
                }
                else if (reward is IReward_Ship)
                {
                    yield return(StartCoroutine(OnReciveRewardShip((IReward_Ship)reward)));
                }
                else if (reward is Reward_Useitems)
                {
                    TrophyUtil.Unlock_AlbumSlotNum();
                    yield return(StartCoroutine(OnReciveRewardItems((Reward_Useitems)reward)));
                }
                else if (reward is Reward_Deck)
                {
                    yield return(StartCoroutine(OnReciveRewardDeck((Reward_Deck)reward)));
                }
                else if (reward is Reward_LargeBuild)
                {
                    yield return(StartCoroutine(OnReciveRewardLargeBuild((Reward_LargeBuild)reward)));
                }
                else if (reward is IReward_Exchange_Slotitem)
                {
                    yield return(StartCoroutine(OnReciveRewardExchangeSlotItem((IReward_Exchange_Slotitem)reward)));
                }
                else if (reward is Reward_Furniture)
                {
                    yield return(StartCoroutine(OnReciveRewardFurniture((Reward_Furniture)reward)));
                }
                else if (reward is Reward_SPoint)
                {
                    yield return(StartCoroutine(OnReciveSpoint((Reward_SPoint)reward)));
                }
                else if (reward is Reward_Useitem)
                {
                    TrophyUtil.Unlock_AlbumSlotNum();
                    yield return(StartCoroutine(OnReciveRewardItem((Reward_Useitem)reward)));
                }
                else if (reward is IReward_Slotitem)
                {
                    TrophyUtil.Unlock_AlbumSlotNum();
                    yield return(StartCoroutine(OnReciveRewardSlotItem((IReward_Slotitem)reward)));
                }
                else if (reward is Reward_DeckPracitce)
                {
                    yield return(StartCoroutine(OnReciveRewardOpenDeckPractice((Reward_DeckPracitce)reward)));
                }
                else if (reward is Reward_TransportCraft)
                {
                    yield return(StartCoroutine(OnReciveRewardTransportCraft((Reward_TransportCraft)reward)));
                }
            }
            SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(mDutyManager);

            DutyModel[] duties = GetDuties();
            mDutyGrid.Initialize(duties);
            mDutyGrid.GoToPage(0);
            mModalCamera.Close();
            ChangeKeyController(mDutyGrid.GetKeyController());
            mDutyGrid.FirstFocus();
            if (duties.Length <= 0)
            {
                mTransform_AllClearText.SetActive(isActive: true);
            }
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true;
            UpdateOrderPossibleDutyCount(mDutyManager.MaxExecuteCount - mDutyManager.GetExecutedDutyList().Count, animate: true);
        }