private IEnumerator StrokingEgg(string userMonsterId, string eggModelId, Action <MonsterData> OnStroked) { PartsMenu.instance.gameObject.SetActive(false); foreach (PicturebookDetailController picturebookDetailController in this.eggControllerList) { picturebookDetailController.gameObject.SetActive(false); } this.MoveTo(this.modelUiTex.gameObject, this.fullScreenModelTexPos, 0.18f, iTween.EaseType.linear, null); this.ChangeDisplayModeToFullScreen(); this.displayModeButtonLabel.transform.parent.gameObject.SetActive(false); this.strokeUiTex.gameObject.SetActive(true); this.isStrokeEnd = false; CommonRender3DRT render3DRT = this.CreateRender3DRT(true, eggModelId, this.strokeUiTex); this.SetRender3Dcamera(true, render3DRT, true); DigimonActionInGarden digimonAct = this.AttachActionScript(render3DRT.gameObject, true); digimonAct.transform.localPosition = Vector3.zero; digimonAct.transform.localScale = new Vector3(2f, 2f, 2f); while (!this.isStrokeEnd) { yield return(null); } this.particle.SetActive(true); digimonAct.gameObject.SetActive(false); yield return(new WaitForSeconds(1.2f)); UnityEngine.Object.Destroy(digimonAct.transform.parent.gameObject); MonsterData afterMonsterData = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterId); render3DRT = this.CreateRender3DRT(false, afterMonsterData.GetMonsterMaster().Group.modelId, this.strokeUiTex); this.SetRender3Dcamera(false, render3DRT, true); DigimonActionInGarden newDigimonAct = this.AttachActionScript(render3DRT.gameObject, false); newDigimonAct.transform.localPosition = Vector3.zero; newDigimonAct.transform.localScale = new Vector3(2f, 2f, 2f); yield return(new WaitForSeconds(2f)); this.strokeUiTex.gameObject.SetActive(false); newDigimonAct.transform.parent.gameObject.SetActive(false); UnityEngine.Object.Destroy(newDigimonAct.transform.parent.gameObject); this.ChangeDisplayModeToList(); this.MoveTo(this.modelUiTex.gameObject, this.listScreenModelTexPos, 0.18f, iTween.EaseType.linear, null); this.displayModeButtonLabel.transform.parent.gameObject.SetActive(true); this.isStrokeEnd = false; this.particle.SetActive(false); OnStroked(afterMonsterData); foreach (PicturebookDetailController picturebookDetailController2 in this.eggControllerList) { picturebookDetailController2.gameObject.SetActive(true); } PartsMenu.instance.gameObject.SetActive(true); yield break; }
public void InitMonsterList() { List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList(); list = MonsterFilter.Filter(list, MonsterFilterType.GROWING_IN_GARDEN); MonsterDataMng.Instance().SortMDList(list); PushNotice.Instance.SyncGardenPushNoticeData(list); if (list.Count == 0) { this.cautionTextLabel.gameObject.SetActive(true); this.cautionTextLabel.text = StringMaster.GetString("Garden-01"); } else if (this.cautionTextLabel.gameObject.activeSelf) { this.cautionTextLabel.gameObject.SetActive(false); } if (null != FarmObject_DigiGarden.Instance) { FarmObject_DigiGarden.Instance.SetAutoActiveCanEvolveParticle(); } this.csSelectPanel.initLocation = true; this.goMN_LIST[0].SetActive(true); this.csSelectPanel.AllBuild(list, new Action <CMD, string, string>(this.OnBornExec), new Action <MonsterData>(this.OnPushEvolutionButton)); this.goMN_LIST[0].SetActive(false); this.modelUiTex.gameObject.SetActive(list.Count != 0); int num = 0; foreach (MonsterData monsterData in list) { if (monsterData.userMonster.eggFlg == "1") { num++; } } foreach (PicturebookDetailController picturebookDetailController in this.eggControllerList) { picturebookDetailController.CallMethodOnClick = "OnClickEgg_Dummy"; } int num2 = 0; int num3 = 0; foreach (MonsterData monsterData2 in list) { if (monsterData2.userMonster.IsEgg()) { string eggModelId = MonsterObject.GetEggModelId(monsterData2.userMonster.monsterEvolutionRouteId); CommonRender3DRT commonRender3DRT = this.CreateRender3DRT(true, eggModelId, this.modelUiTex); this.SetRender3Dcamera(true, commonRender3DRT, false); DigimonActionInGarden digimonActionInGarden = this.AttachActionScript(commonRender3DRT.gameObject, true); this.charaActList.Add(digimonActionInGarden); this.eggControllerList[num2].CallMethodOnClick = this.callMeyhodsOnEggClick[num3]; if (num != 1) { if (num != 2) { if (num == 3) { num2++; if (num2 != 1) { if (num2 != 2) { if (num2 == 3) { digimonActionInGarden.SetPosition(this.eggPos_3); } } else { digimonActionInGarden.SetPosition(this.eggPos_2); } } else { digimonActionInGarden.SetPosition(this.eggPos_1); } } } else { num2++; if (num2 != 1) { if (num2 == 2) { digimonActionInGarden.SetPosition(this.eggPos_2); } } else { digimonActionInGarden.SetPosition(this.eggPos_1); } } } else { digimonActionInGarden.SetPosition(this.eggPos_1); } digimonActionInGarden.SetDefaultAnimation(this.eggLoopAnimClipList[num3]); } else { CommonRender3DRT commonRender3DRT2 = this.CreateRender3DRT(false, monsterData2.GetMonsterMaster().Group.modelId, this.modelUiTex); this.SetRender3Dcamera(false, commonRender3DRT2, false); DigimonActionInGarden digimonActionInGarden2 = this.AttachActionScript(commonRender3DRT2.gameObject, false); this.charaActList.Add(digimonActionInGarden2); digimonActionInGarden2.RandomPosition(); digimonActionInGarden2.WalkAction(); } num3++; } }