Exemple #1
0
        public CharacterCameraView(MonsterData monsterData, int width, int height)
        {
            GameObject gameObject = GUIManager.LoadCommonGUI("Render3D/Render3DRT", null);

            this.csRender3DRT = gameObject.GetComponent <CommonRender3DRT>();
            if (!monsterData.userMonster.IsEgg())
            {
                string filePath = MonsterObject.GetFilePath(monsterData.GetMonsterMaster().Group.modelId);
                this.csRender3DRT.LoadChara(filePath, 0f, 10000f, -0.65f, 1.1f, true);
                this.csRender3DRT.SetBillBoardCamera();
            }
            else
            {
                string eggModelId = MonsterObject.GetEggModelId(monsterData.userMonster.monsterEvolutionRouteId);
                string filePath2  = MonsterObject.GetFilePath(eggModelId);
                this.csRender3DRT.LoadEgg(filePath2, 0f, 10000f, 0.1f);
            }
            this.renderTex    = this.csRender3DRT.SetRenderTarget(width, height, 16);
            this.defaultPos   = Camera.main.ScreenToViewportPoint(new Vector3(-382f, -80f, 0f));
            this.defaultPos.x = -0.6f;
            this.orignal      = this.csRender3DRT.projectionMatrix;
            Matrix4x4 lhs = Matrix4x4.TRS(this.defaultPos, Quaternion.identity, Vector3.one);

            this.csRender3DRT.projectionMatrix = lhs * this.orignal;
            this.pinch = new PinchInOut();
        }
    private void OpenConfirmBorn()
    {
        CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(null, "CMD_Confirm", null) as CMD_Confirm;

        cmd_Confirm.Title = StringMaster.GetString("Garden-05");
        cmd_Confirm.Info  = StringMaster.GetString("Garden-06");
        cmd_Confirm.SetActionYesButton(delegate(CMD cmd)
        {
            string eggModelId = MonsterObject.GetEggModelId(this.data.userMonster.monsterEvolutionRouteId);
            this.onBorn(cmd, this.data.userMonster.userMonsterId, eggModelId);
        });
    }
Exemple #3
0
 public void SetEggData(string monsterEvolutionRouteId)
 {
     this.eggModelId     = MonsterObject.GetEggModelId(monsterEvolutionRouteId);
     this.monsterModelId = string.Empty;
 }
    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++;
        }
    }