当前位置: 首页>>代码示例>>C#>>正文


C# VertexHelper.AddUIVertexTriangleStream方法代码示例

本文整理汇总了C#中UnityEngine.UI.VertexHelper.AddUIVertexTriangleStream方法的典型用法代码示例。如果您正苦于以下问题:C# VertexHelper.AddUIVertexTriangleStream方法的具体用法?C# VertexHelper.AddUIVertexTriangleStream怎么用?C# VertexHelper.AddUIVertexTriangleStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.UI.VertexHelper的用法示例。


在下文中一共展示了VertexHelper.AddUIVertexTriangleStream方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ModifyMesh

 public override void ModifyMesh(Mesh mesh)
 {
     if (this.IsActive())
     {
         List<UIVertex> stream = new List<UIVertex>();
         using (VertexHelper helper = new VertexHelper(mesh))
         {
             helper.GetUIVertexStream(stream);
         }
         int num = stream.Count * 5;
         if (stream.Capacity < num)
         {
             stream.Capacity = num;
         }
         int start = 0;
         int count = stream.Count;
         base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, base.effectDistance.x, base.effectDistance.y);
         start = count;
         count = stream.Count;
         base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, base.effectDistance.x, -base.effectDistance.y);
         start = count;
         count = stream.Count;
         base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, -base.effectDistance.x, base.effectDistance.y);
         start = count;
         count = stream.Count;
         base.ApplyShadowZeroAlloc(stream, base.effectColor, start, stream.Count, -base.effectDistance.x, -base.effectDistance.y);
         using (VertexHelper helper2 = new VertexHelper())
         {
             helper2.AddUIVertexTriangleStream(stream);
             helper2.FillMesh(mesh);
         }
     }
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:33,代码来源:Outline.cs

示例2: ModifyMesh

        public override void ModifyMesh(VertexHelper vh)
        {
            if (!IsActive())
                return;

            var verts = ListPool<UIVertex>.Get();
            vh.GetUIVertexStream(verts);

            var neededCpacity = verts.Count * 5;
            if (verts.Capacity < neededCpacity)
                verts.Capacity = neededCpacity;

            var start = 0;
            var end = verts.Count;
            ApplyShadowZeroAlloc(verts, effectColor, start, verts.Count, effectDistance.x, effectDistance.y);

            start = end;
            end = verts.Count;
            ApplyShadowZeroAlloc(verts, effectColor, start, verts.Count, effectDistance.x, -effectDistance.y);

            start = end;
            end = verts.Count;
            ApplyShadowZeroAlloc(verts, effectColor, start, verts.Count, -effectDistance.x, effectDistance.y);

            start = end;
            end = verts.Count;
            ApplyShadowZeroAlloc(verts, effectColor, start, verts.Count, -effectDistance.x, -effectDistance.y);

            vh.Clear();
            vh.AddUIVertexTriangleStream(verts);
            ListPool<UIVertex>.Release(verts);
        }
开发者ID:gdzzzyyy,项目名称:UGUIlok,代码行数:32,代码来源:Outline.cs

示例3: ModifyMesh

		public override void ModifyMesh(Mesh mesh) {

			if (this.IsActive() == false) {

				return;

			}
			
			var list = new List<UIVertex>();
			using (var vertexHelper = new VertexHelper(mesh)) {

				vertexHelper.GetUIVertexStream(list);

			}
			
			this.ModifyVertices(list);  // calls the old ModifyVertices which was used on pre 5.2
			
			using (var vertexHelper = new VertexHelper()) {

				vertexHelper.AddUIVertexTriangleStream(list);
				vertexHelper.FillMesh(mesh);

			}

		}
开发者ID:RuFengLau,项目名称:Unity3d.UI.Windows,代码行数:25,代码来源:BaseVertexEffect.cs

示例4: ModifyMesh

    public override void ModifyMesh(VertexHelper vh)
    {
        if (!IsActive())
        {
            return;
        }

        List<UIVertex> verts = new List<UIVertex>();
        vh.GetUIVertexStream(verts);

        if (verts == null || verts.Count == 0)
        {
            return;
        }

        int start;
        int end = 0;

        for (float i = 0; i <= Mathf.PI * 2; i += Mathf.PI / (float)mDivideAmoumt)
        {
            start = end;
            end = verts.Count;
            ApplyShadow(verts, effectColor, start, end, effectDistance.x * Mathf.Cos(i), effectDistance.y * Mathf.Sin(i));
        }

        vh.Clear();
        vh.AddUIVertexTriangleStream(verts);
    }
开发者ID:woshihuo12,项目名称:UnityHello,代码行数:28,代码来源:UITextOutline.cs

示例5: ModifyMesh

 public override void ModifyMesh(VertexHelper vh)
 {
   if (!this.IsActive())
     return;
   List<UIVertex> list = ListPool<UIVertex>.Get();
   vh.GetUIVertexStream(list);
   int num = list.Count * 5;
   if (list.Capacity < num)
     list.Capacity = num;
   int start1 = 0;
   int count1 = list.Count;
   this.ApplyShadowZeroAlloc(list, (Color32) this.effectColor, start1, list.Count, this.effectDistance.x, this.effectDistance.y);
   int start2 = count1;
   int count2 = list.Count;
   this.ApplyShadowZeroAlloc(list, (Color32) this.effectColor, start2, list.Count, this.effectDistance.x, -this.effectDistance.y);
   int start3 = count2;
   int count3 = list.Count;
   this.ApplyShadowZeroAlloc(list, (Color32) this.effectColor, start3, list.Count, -this.effectDistance.x, this.effectDistance.y);
   int start4 = count3;
   int count4 = list.Count;
   this.ApplyShadowZeroAlloc(list, (Color32) this.effectColor, start4, list.Count, -this.effectDistance.x, -this.effectDistance.y);
   vh.Clear();
   vh.AddUIVertexTriangleStream(list);
   ListPool<UIVertex>.Release(list);
 }
开发者ID:NetherDrk,项目名称:Eternal-Empire,代码行数:25,代码来源:Outline.cs

示例6: ModifyMesh

 public override void ModifyMesh(VertexHelper vertexHelper)
 {
     List<UIVertex> vertexList = new List<UIVertex>();
     vertexHelper.GetUIVertexStream(vertexList);
     ModifyVertices(vertexList);
     vertexHelper.Clear();
     vertexHelper.AddUIVertexTriangleStream(vertexList);
 }
开发者ID:tettasun,项目名称:BookSample,代码行数:8,代码来源:VertexMesh.cs

示例7: ModifyMesh

		public void ModifyMesh(VertexHelper helper) {

			var list = new List<UIVertex>();
			helper.GetUIVertexStream(list);

			this.ModifyVertices(list);  // calls the old ModifyVertices which was used on pre 5.2

			helper.AddUIVertexTriangleStream(list);

		}
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:10,代码来源:UIFlippable.cs

示例8: ModifyMesh

 public override void ModifyMesh(VertexHelper vh)
 {
     if (this.IsActive())
     {
         List<UIVertex> stream = ListPool<UIVertex>.Get();
         vh.GetUIVertexStream(stream);
         this.ApplyShadow(stream, this.effectColor, 0, stream.Count, this.effectDistance.x, this.effectDistance.y);
         vh.Clear();
         vh.AddUIVertexTriangleStream(stream);
         ListPool<UIVertex>.Release(stream);
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:12,代码来源:Shadow.cs

示例9: ModifyMesh

    public override void ModifyMesh(VertexHelper vertexHelper)
    {
        if (!this.IsActive())
            return;

        List<UIVertex> list = new List<UIVertex>();

        vertexHelper.GetUIVertexStream(list);
        ModifyVertices(list);

        vertexHelper.AddUIVertexTriangleStream(list);
    }
开发者ID:DevonHansen,项目名称:DudeWheresMyCombo,代码行数:12,代码来源:Gradient.cs

示例10: ModifyMesh

//        // ------------------------------------------------------------------>>>>>>  TO HERE!!
        public override void ModifyMesh(VertexHelper vh)
        {
            if (!this.IsActive())
                return;
            
            List<UIVertex> vertexList = new List<UIVertex>();
            vh.GetUIVertexStream(vertexList);

            ModifyVertices(vertexList);

            vh.Clear();
            vh.AddUIVertexTriangleStream(vertexList);
        }
开发者ID:rhysb89,项目名称:AdelaidePrototype,代码行数:14,代码来源:GradientEffect.cs

示例11: ModifyMesh

        public void ModifyMesh(VertexHelper vertexHelper)
		{
			if (!this.enabled)
				return;
			
			List<UIVertex> list = new List<UIVertex>();
			vertexHelper.GetUIVertexStream(list);
			
			ModifyVertices(list);  // calls the old ModifyVertices which was used on pre 5.2
			
			vertexHelper.Clear();
			vertexHelper.AddUIVertexTriangleStream(list);
		}
开发者ID:callumlawson,项目名称:FinalFlight,代码行数:13,代码来源:UIFlippable.cs

示例12: ModifyMesh

 public override void ModifyMesh(VertexHelper vh)
 {
     List<UIVertex> list = new List<UIVertex>();
     vh.GetUIVertexStream(list);
     vh.Clear();
     for (int i = 0; i < list.Count; i++)
     {
         var v = list[i];
         v.uv1 = AlphaUV[IndexMap[i]];
         list[i] = v;
     }
     vh.AddUIVertexTriangleStream(list);
 }
开发者ID:yangruihan,项目名称:Unity3D_Project,代码行数:13,代码来源:AlphaMapper.cs

示例13: ModifyMesh

        public override void ModifyMesh (VertexHelper vh)
        {
            if (IsActive() == false) {
                return;
            }

            var vList = new List<UIVertex>();
            vh.GetUIVertexStream(vList);

            ModifyVertices(vList);

            vh.Clear();
            vh.AddUIVertexTriangleStream(vList);
        }
开发者ID:K-Yoshiki,项目名称:menko,代码行数:14,代码来源:BlendColor.cs

示例14: ModifyMesh

    public override void ModifyMesh(VertexHelper vh)
    {
        if (!IsActive())
        {
            return;
        }

        var vertexList = new List<UIVertex>();
        vh.GetUIVertexStream(vertexList);
        int count = vertexList.Count;

        ApplyGradient(vertexList, 0, count);
        vh.Clear();
        vh.AddUIVertexTriangleStream(vertexList);
    }
开发者ID:yuisunn,项目名称:UnityCrazy,代码行数:15,代码来源:NewBehaviourScript.cs

示例15: ModifyMesh

    public override void ModifyMesh(VertexHelper vh)
#endif
    {
        if (!this.IsActive())
            return;
        
        List<UIVertex> list = new List<UIVertex>();
        vh.GetUIVertexStream(list);
        
        ModifyVertices(list);

#if UNITY_5_2_1pX || UNITY_5_3
        vh.Clear();
#endif
        vh.AddUIVertexTriangleStream(list);
    }
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:16,代码来源:ModifiedShadow.cs


注:本文中的UnityEngine.UI.VertexHelper.AddUIVertexTriangleStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。