private void OnCompleteShipBreakAnimation() { bool flag = this.mStateManager.CurrentState == TaskArsenalListManager.State.ShipDestroying; if (flag) { SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(this.mArsenalManager); ShipModel[] shipList = this.mArsenalManager.GetShipList(); this.UpdateKaitaiInfo(null); int focusModelIndex = this.ShipScroll.GetFocusModelIndex(); this.ShipScroll.Refresh(shipList); this.ShipScroll.SetKeyController(this.KeyController); this.ShipScroll.StartControl(); this.CloseShipDialog(); this.mStateManager.PopState(); if (this.mStateManager.CurrentState == TaskArsenalListManager.State.ShipDestroyConfirm) { this.mStateManager.PopState(); } if (this.mStateManager.CurrentState == TaskArsenalListManager.State.ShipSelect) { this.mStateManager.ResumeState(); } TrophyUtil.Unlock_Material(); } }
private void OnDestroy() { TrophyUtil.Unlock_Material(); Mem.DelIDisposableSafe(ref _clsSortieBattlePrefabFile); Mem.Del(ref _camTransitionCamera); Mem.Del(ref _clsInput); Mem.Del(ref _iRecoveryType); if (_clsMapManager != null) { _clsMapManager.MapEnd(); } Mem.Del(ref _clsMapManager); if (_clsTasks != null) { _clsTasks.UnInit(); } Mem.Del(ref _clsTasks); Mem.Del(ref _iMode); Mem.Del(ref _iModeReq); if (_clsSortieMapTaskManager != null) { _clsSortieMapTaskManager.Terminate(); } Mem.Del(ref _clsSortieMapTaskManager); Mem.Del(ref _clsBattleTaskManager); Mem.Del(ref _clsBattleCutManager); Mst_DataManager.Instance.PurgeUIBattleMaster(); Mem.Del(ref instance); }
private void OnDestroy() { TrophyUtil.Unlock_Material(); Mem.DelIDisposableSafe <SortieBattlePrefabFile>(ref this._clsSortieBattlePrefabFile); Mem.Del <Camera>(ref this._camTransitionCamera); Mem.Del <KeyControl>(ref SortieBattleTaskManager._clsInput); Mem.Del <ShipRecoveryType>(ref SortieBattleTaskManager._iRecoveryType); if (SortieBattleTaskManager._clsMapManager != null) { SortieBattleTaskManager._clsMapManager.MapEnd(); } Mem.Del <MapManager>(ref SortieBattleTaskManager._clsMapManager); if (SortieBattleTaskManager._clsTasks != null) { SortieBattleTaskManager._clsTasks.UnInit(); } Mem.Del <SceneTasksMono>(ref SortieBattleTaskManager._clsTasks); Mem.Del <SortieBattleMode>(ref SortieBattleTaskManager._iMode); Mem.Del <SortieBattleMode>(ref SortieBattleTaskManager._iModeReq); if (this._clsSortieMapTaskManager != null) { this._clsSortieMapTaskManager.Terminate(); } Mem.Del <SortieMapTaskManager>(ref this._clsSortieMapTaskManager); Mem.Del <BattleTaskManager>(ref this._clsBattleTaskManager); Mem.Del <BattleCutManager>(ref this._clsBattleCutManager); Mst_DataManager.Instance.PurgeUIBattleMaster(); Mem.Del <SortieBattleTaskManager>(ref SortieBattleTaskManager.instance); }
private void OnCompleteSlotItemBreakAnimation() { bool flag = this.mStateManager.CurrentState == TaskArsenalListManager.State.SlotItemDestroying; if (flag) { SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(this.mArsenalManager); SlotitemModel[] unsetSlotitems = this.mArsenalManager.GetUnsetSlotitems(); this.UpdateHaikiInfo(); this.ItemScroll.Refresh(unsetSlotitems); this.ItemScroll.SetKeyController(this.KeyController); this.ItemScroll.StartControl(); this.CloseHaikiDialog(); this.mStateManager.PopState(); if (this.mStateManager.CurrentState == TaskArsenalListManager.State.SlotItemDestroyConfirm) { this.mStateManager.PopState(); } if (this.mStateManager.CurrentState == TaskArsenalListManager.State.SlotItemSelect) { this.mStateManager.ResumeState(); } TrophyUtil.Unlock_Material(); } }
public void Play() { mMissionResultStatus.PlayShowBanners(delegate { mMissionJudgeCutIn.SetOnFinishedAnimationListener(delegate { TrophyUtil.Unlock_UserLevel(); TrophyUtil.Unlock_Material(); mKeyController.IsRun = true; StartCoroutine(WaitForKeyOrTouch(mKeyController, delegate { mKeyController.ClearKeyAll(); mMissionJudgeCutIn.SetActive(isActive: false); mMissionResultStatus.PlayShowBannersExp(null); mMissionResultBonus.Play(delegate { mTransform_TouchControlArea.SetActive(isActive: true); mKeyController.IsRun = true; StartCoroutine(WaitForKeyOrTouch(mKeyController, delegate { mKeyController.IsRun = true; if (mOnSelectNextAction != null) { mOnSelectNextAction(); } })); }); })); }); mMissionJudgeCutIn.Play(); }); }
private IEnumerator OnReciveRewardMaterials(IReward_Material[] materials) { TrophyUtil.Unlock_Material(); bool recived = false; UIGetRewardDialog rewardMateralsDialog = Util.Instantiate(mPrefabUIDutyRewardMaterialsDialog.gameObject, mModalCamera.gameObject).GetComponent <UIGetRewardDialog>(); List <IReward> rewardMaterials = new List <IReward>(); foreach (IReward_Material material in materials) { rewardMaterials.Add(material); } IReward[] rewards = rewardMaterials.ToArray(); rewardMateralsDialog.Initialize(rewards); rewardMateralsDialog.SetOnDialogClosedCallBack(delegate { recived = true; rewardMateralsDialog.Close(); UnityEngine.Object.Destroy(rewardMateralsDialog.gameObject); }); KeyControl rewardDialogKeyController = rewardMateralsDialog.Show(); ChangeKeyController(rewardDialogKeyController); while (!recived) { yield return(new WaitForSeconds(0.5f)); } }
private IEnumerator OnGetRewards(ItemlistModel usedModel, IReward[] rewards, Action onAllReceived) { foreach (IReward reward in rewards) { if (reward is IReward_Useitem) { yield return(StartCoroutine(OnGetUseItemReward(usedModel, (IReward_Useitem)reward))); } else if (reward is IReward_Materials) { TrophyUtil.Unlock_Material(); yield return(StartCoroutine(OnGetMaterialsReward(usedModel, (IReward_Materials)reward))); } } onAllReceived?.Invoke(); }
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 IEnumerator ChangeNumAnimation(UILabel label, int LabelNo) { int changeValue = MaterialsNumInt[LabelNo] - PrevMaterialsNumInt[LabelNo]; string PlusMinus; if (changeValue < 0) { PlusMinus = string.Empty; label.color = Color.red; } else { PlusMinus = "+"; label.color = Color.cyan; TrophyUtil.Unlock_Material(); } label.text = PlusMinus + changeValue; yield return(new WaitForSeconds(1f)); label.color = Color.white; label.text = MaterialsNumInt[LabelNo].ToString(); TweenLabel(LabelNo, PrevMaterialsNumInt[LabelNo], MaterialsNumInt[LabelNo]); coroutines[LabelNo] = null; }