コード例 #1
0
ファイル: NcSpriteTexture.cs プロジェクト: isoundy000/wzry-1
 private void UpdateSpriteTexture(bool bShowEffect)
 {
     if (this.UpdateSpriteMaterial() && this.m_NcSpriteFactoryCom.IsValidFactory())
     {
         if (this.m_NcSpriteFrameInfos.Length == 0)
         {
             this.SetSpriteFactoryIndex(this.m_nSpriteFactoryIndex, this.m_nFrameIndex, false);
         }
         if (base.m_MeshFilter == null)
         {
             if (base.gameObject.GetComponent <MeshFilter>() != null)
             {
                 base.m_MeshFilter = base.gameObject.GetComponent <MeshFilter>();
             }
             else
             {
                 base.m_MeshFilter = base.gameObject.AddComponent <MeshFilter>();
             }
         }
         NcSpriteFactory.CreatePlane(base.m_MeshFilter, this.m_fUvScale, this.m_NcSpriteFrameInfos[this.m_nFrameIndex], false, this.m_AlignType, this.m_MeshType);
         NcSpriteFactory.UpdateMeshUVs(base.m_MeshFilter, this.m_NcSpriteFrameInfos[this.m_nFrameIndex].m_TextureUvOffset);
         if (bShowEffect)
         {
             this.m_EffectObject = this.m_NcSpriteFactoryCom.CreateSpriteEffect(this.m_nSpriteFactoryIndex, base.transform);
         }
     }
 }
コード例 #2
0
ファイル: NcSpriteAnimation.cs プロジェクト: wly2/BaiLaoHui
 void UpdateBuiltInPlane(int nSelIndex)
 {
     NcSpriteFactory.UpdatePlane(m_MeshFilter, m_fUvScale, m_NcSpriteFrameInfos[nSelIndex],
                                 (m_TextureType == TEXTURE_TYPE.TileTexture ? false : m_bTrimCenterAlign), m_AlignType, m_fShowRate);
     NcSpriteFactory.UpdateMeshUVs(m_MeshFilter, m_NcSpriteFrameInfos[nSelIndex].m_TextureUvOffset, m_AlignType,
                                   m_fShowRate);
 }
コード例 #3
0
    void UpdateSpriteTexture(bool bShowEffect)
    {
        if (!UpdateSpriteMaterial())
        {
            return;
        }
        if (!m_NcSpriteFactoryCom.IsValidFactory())
        {
            return;
        }
        if (m_NcSpriteFrameInfos.Length == 0)
        {
            SetSpriteFactoryIndex(m_nSpriteFactoryIndex, m_nFrameIndex, false);
        }

        if (m_MeshFilter == null)
        {
            if (gameObject.GetComponent <MeshFilter>() != null)
            {
                m_MeshFilter = gameObject.GetComponent <MeshFilter>();
            }
            else
            {
                m_MeshFilter = gameObject.AddComponent <MeshFilter>();
            }
        }

        NcSpriteFactory.CreatePlane(m_MeshFilter, m_fUvScale, m_NcSpriteFrameInfos[m_nFrameIndex], false, m_AlignType,
                                    m_MeshType, m_fShowRate);
        NcSpriteFactory.UpdateMeshUVs(m_MeshFilter, m_NcSpriteFrameInfos[m_nFrameIndex].m_TextureUvOffset, m_AlignType,
                                      m_fShowRate);
        //      {
        // //           Debug.Log("m_Renderer.material");
        //          renderer.material.mainTextureScale	= new Vector2(m_fTilingX, m_fTilingY);
        //          renderer.material.mainTextureOffset	= new Vector2(m_fOffsetX, m_fOffsetY);
        //      }

        if (bShowEffect)
        {
            m_EffectObject = m_NcSpriteFactoryCom.CreateSpriteEffect(m_nSpriteFactoryIndex, transform);
        }
    }
コード例 #4
0
 void UpdateBuiltInPlane(int nSelIndex)
 {
     NcSpriteFactory.UpdatePlane(m_MeshFilter, m_fUvScale, m_NcSpriteFrameInfos[nSelIndex], m_AlignType);
     NcSpriteFactory.UpdateMeshUVs(m_MeshFilter, m_NcSpriteFrameInfos[nSelIndex].m_TextureUvOffset);
 }
コード例 #5
0
 private void UpdateBuiltInPlane(int nSelIndex)
 {
     NcSpriteFactory.UpdatePlane(this.m_MeshFilter, this.m_fUvScale, this.m_NcSpriteFrameInfos[nSelIndex], this.m_TextureType != NcSpriteAnimation.TEXTURE_TYPE.TileTexture && this.m_bTrimCenterAlign, this.m_AlignType);
     NcSpriteFactory.UpdateMeshUVs(this.m_MeshFilter, this.m_NcSpriteFrameInfos[nSelIndex].m_TextureUvOffset);
 }
コード例 #6
0
 private void UpdateBuiltInPlane(int nSelIndex)
 {
     NcSpriteFactory.UpdatePlane(base.m_MeshFilter, this.m_fUvScale, this.m_NcSpriteFrameInfos[nSelIndex], (this.m_TextureType != TEXTURE_TYPE.TileTexture) ? this.m_bTrimCenterAlign : false, this.m_AlignType);
     NcSpriteFactory.UpdateMeshUVs(base.m_MeshFilter, this.m_NcSpriteFrameInfos[nSelIndex].m_TextureUvOffset);
 }