本文整理汇总了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);
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例6: ModifyMesh
public override void ModifyMesh(VertexHelper vertexHelper)
{
List<UIVertex> vertexList = new List<UIVertex>();
vertexHelper.GetUIVertexStream(vertexList);
ModifyVertices(vertexList);
vertexHelper.Clear();
vertexHelper.AddUIVertexTriangleStream(vertexList);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}