Esempio n. 1
0
    /// <summary>
    /// 显示角色模型
    /// </summary>
    public void ShowCharacter()
    {
        int tid = m_ServerListProxy.GetCurrentCharacterVO().Tid;

        if (m_CfgEternityProxy.GetPlayerByItemTId(tid) != null)
        {
            Model          m_Model       = m_CfgEternityProxy.GetItemModelByKey((uint)tid);
            Effect3DViewer m_npc3DViewer = m_CharacterModel.GetOrAddComponent <Effect3DViewer>();
            if (m_npc3DViewer != null)
            {
                m_npc3DViewer.ClearModel();
                m_npc3DViewer.LoadModel
                    (AssetAddressKey.PRELOADUI_UI3D_ESCCHARACTERPANEL,
                    m_Model.AssetName,
                    AssetAddressKey.FX_UI_CHARACTER_SCANNING,
                    GetNpcPos(m_Model),
                    GetNpcRotation(m_Model),
                    GetNpcScale(m_Model));
            }
        }
        else
        {
            Debug.Log("tid错误" + tid);
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 显示模型
    /// </summary>
    public void ShowModel()
    {
        CfgEternityProxy m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        Effect3DViewer   m_Model3DViewer    = m_Model.GetOrAddComponent <Effect3DViewer>();
        UiModel          m_UiModel          = m_CfgEternityProxy.GetUiModel("Esc_1002");

        if (m_Model3DViewer != null)
        {
            //m_Model3DViewer.AutoAdjustBestRotationAndDistance = true;
            m_Model3DViewer.ClearModel();
            m_Model3DViewer.LoadModel
                (m_UiModel.Light, m_UiModel.ModelName,
                m_CfgEternityProxy.GetUiModelPos(m_UiModel), m_CfgEternityProxy.GetUiModelRotation(m_UiModel), m_CfgEternityProxy.GetUiModelScale(m_UiModel));
        }
    }
Esempio n. 3
0
    /// <summary>
    /// 显示模型
    /// </summary>
    public void ShowModel()
    {
        CfgEternityProxy m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        ShipProxy        m_ShipProxy        = GameFacade.Instance.RetrieveProxy(ProxyName.ShipProxy) as ShipProxy;
        IShip            m_Ship             = m_ShipProxy.GetAppointWarShip();
        Effect3DViewer   m_Model3DViewer    = m_Model.GetOrAddComponent <Effect3DViewer>();
        Model            m_UiModel          = m_CfgEternityProxy.GetModel((int)m_Ship.GetBaseConfig().Model);

        if (m_Model3DViewer != null)
        {
            m_Model3DViewer.AutoAdjustBestRotationAndDistance = true;
            m_Model3DViewer.ClearModel();
            m_Model3DViewer.LoadModel
                (AssetAddressKey.PRELOADUI_UI3DSHIP, m_UiModel.AssetName);
        }
    }
Esempio n. 4
0
        private static void AddBinder(MenuCommand command)
        {
            RawImage context = (RawImage)command.context;

            context.GetOrAddComponent <RawImageBinder>();
        }