Exemple #1
0
    /// <summary>
    /// 刷新面板
    /// </summary>
    private void UpdatePanel()
    {
        HideFashiontips();
        switch (m_em_panelMode)
        {
        case PropPanelMode.Title:
            InitTitle();
            break;

        case PropPanelMode.Prop:
        {
            ResetPlayerObj();
            ShowPlayerRenderTex(true);

            ShowPetRenderTex(false);
            if (m_RTObj != null)
            {
                m_RTObj.SetModelScale(1);
            }
            PlayShowAni();
        }
        break;

        case PropPanelMode.Fashion:
            InitSuitUI();
            break;
        }
    }
Exemple #2
0
    public void SetModel(List <SuitData> suitData, int job, uint faceId)
    {
        int sex = 0;

        sex = (int)GameUtil.FaceToSex(faceId);

        rtGo.SetActive(true);

        if (suitData == null)//机器人无时装数据
        {
            suitData = new List <SuitData>();
            SuitData sd = new SuitData {
                baseid = 0, suit_type = EquipSuitType.Unknow_Type
            };
            suitData.Add(sd);
        }

        if (rtObj != null)
        {
            rtObj.Release();
        }
        rtObj = DataManager.Manager <RenderTextureManager>().CreateRenderTextureObj(suitData, job, sex, 700);
        if (rtObj == null)
        {
            return;
        }

        UIRenderTexture rt = rtGo.GetComponent <UIRenderTexture>();

        if (rt == null)
        {
            rt = rtGo.AddComponent <UIRenderTexture>();
        }
        rtObj.SetModelRotateY(180);
        rtObj.SetModelScale(1f);
        rtObj.SetCamera(new Vector3(0, 1f, 0f), new Vector3(15, 0, 0), 4f);
        rt.SetDepth(3);
        rt.Initialize(rtObj, 180f, new UnityEngine.Vector2(600f, 600f));
        rtObj.PlayModelAni(Client.EntityAction.Stand);
    }