25 lines
671 B
C#
25 lines
671 B
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
namespace Game
|
|||
|
{
|
|||
|
public class ShapeImage : Image
|
|||
|
{
|
|||
|
// <20><>бƫ<D0B1><C6AB>
|
|||
|
public float offset;
|
|||
|
|
|||
|
protected override void OnPopulateMesh(VertexHelper toFill)
|
|||
|
{
|
|||
|
base.OnPopulateMesh(toFill);
|
|||
|
|
|||
|
UIVertex vertex = new UIVertex();
|
|||
|
toFill.PopulateUIVertex(ref vertex, 1);
|
|||
|
vertex.position += Vector3.right * offset;
|
|||
|
toFill.SetUIVertex(vertex, 1);
|
|||
|
|
|||
|
vertex = new UIVertex();
|
|||
|
toFill.PopulateUIVertex(ref vertex, 2);
|
|||
|
vertex.position += Vector3.right * offset;
|
|||
|
toFill.SetUIVertex(vertex, 2);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|