Exemplo n.º 1
0
    MeshDrawCallV2 createChild()
    {
        GameObject drawCallChild = new GameObject("drawCallChild");
        //NGUITools.AddChild(mPopEntryManagerV2.Instance.gameObject);
        MeshDrawCallV2 dc = drawCallChild.AddComponent <MeshDrawCallV2>();

        dc.Init(mPopEntryManagerV2.Instance.uiAtlas.texture);
        return(dc);
    }
Exemplo n.º 2
0
    MeshDrawCallV2 drawcall; ///mesh 绘制组件


    public virtual void OnBeforeAdd()
    {
        this.drawcall = createChild();

        ///填充顶点数据
        FillV2(
            this.drawcall.verts, this.drawcall.uvs, this.drawcall.cols,
            this.drawcall.vertex1, this.drawcall.vertex2, this.drawcall.vertex3);

        ///生成mesh
        this.drawcall.UpdateGeometry();
    }