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 OnReciveRewardItems(Reward_Useitems useItems) { bool recived = false; UIGetRewardDialog rewardMateralsDialog = Util.Instantiate(mPrefabUIDutyRewardMaterialsDialog.gameObject, mModalCamera.gameObject).GetComponent <UIGetRewardDialog>(); List <Reward_Useitem> rewardItems = new List <Reward_Useitem>(); IReward_Useitem[] rewards = useItems.Rewards; for (int i = 0; i < rewards.Length; i++) { Reward_Useitem iMaterial = (Reward_Useitem)rewards[i]; Reward_Useitem rewardItem = iMaterial; rewardItems.Add(rewardItem); } rewardMateralsDialog.Initialize(rewardItems.ToArray()); 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 OnReciveRewardFurniture(Reward_Furniture reward) { bool recived = false; UIGetRewardDialog rewardMateralsDialog = Util.Instantiate(mPrefabUIDutyRewardMaterialsDialog.gameObject, mModalCamera.gameObject).GetComponent <UIGetRewardDialog>(); rewardMateralsDialog.Initialize(reward); 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 void OnDestroy() { if (DOTween.IsTweening(mLabel_DutyCount)) { DOTween.Kill(mLabel_DutyCount); } if (DOTween.IsTweening(mTexture_LeftArrow)) { DOTween.Kill(mTexture_LeftArrow); } if (DOTween.IsTweening(mTexture_RightArrow)) { DOTween.Kill(mTexture_RightArrow); } if (DOTween.IsTweening(mTexture_LeftArrowShadow)) { DOTween.Kill(mTexture_LeftArrowShadow); } if (DOTween.IsTweening(mTexture_RightArrowShadow)) { DOTween.Kill(mTexture_RightArrowShadow); } UserInterfacePortManager.ReleaseUtils.Releases(ref mTextures_Preload); UserInterfacePortManager.ReleaseUtils.Release(ref mLabel_DutyCount); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_LeftArrow); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_RightArrow); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_LeftArrowShadow); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_RightArrowShadow); mTransform_AllClearText = null; mPrefabDutyDetail = null; mPrefabDutyDetailCheck = null; mPrefabUIDutyRewardMaterialsDialog = null; mPrefabRewardShip = null; mModalCamera = null; mPrefab_DutyOhyodo = null; mDutyGrid = null; mDutyManager = null; mFocusKeyController = null; }
private IEnumerator OnReciveSpoint(Reward_SPoint spoint) { bool recived = false; UIGetRewardDialog rewardMateralsDialog = Util.Instantiate(mPrefabUIDutyRewardMaterialsDialog.gameObject, mModalCamera.gameObject).GetComponent <UIGetRewardDialog>(); new List <IReward>(); rewardMateralsDialog.Initialize(new IReward[1] { spoint }); rewardMateralsDialog.SetOnDialogClosedCallBack(delegate { recived = true; rewardMateralsDialog.Close(); UnityEngine.Object.Destroy(rewardMateralsDialog.gameObject); }); KeyControl rewardDialogKeyController = rewardMateralsDialog.Show(); ChangeKeyController(rewardDialogKeyController); TutorialModel model = mDutyManager.UserInfo.Tutorial; if (SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckFirstTutorial(model, TutorialGuideManager.TutorialID.StrategyPoint)) { rewardDialogKeyController.IsRun = false; yield return(new WaitForSeconds(1f)); SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.StrategyPoint, delegate { rewardDialogKeyController.IsRun = true; }); } while (!recived) { yield return(new WaitForSeconds(0.5f)); } }