本文整理汇总了C#中VectorLine.ZeroPoints方法的典型用法代码示例。如果您正苦于以下问题:C# VectorLine.ZeroPoints方法的具体用法?C# VectorLine.ZeroPoints怎么用?C# VectorLine.ZeroPoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VectorLine
的用法示例。
在下文中一共展示了VectorLine.ZeroPoints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
/// <summary>
/// void Start ()
///
/// Initializes the gameboard.
///
/// </summary>
void Start()
{
//Add observers
NotificationCenter.DefaultCenter().AddObserver(this, "Pause");
NotificationCenter.DefaultCenter().AddObserver(this, "Unpause");
//Move gameboard into position
gameObject.transform.position = new Vector3 (0, 0, 1f);
//Create tileboard
Debug.Log("Creating TileBoard");
for (int x = 0; x < GridWidth; x++) {
for (int y = 0; y < GridHeight; y++)
{
GameObject g = Instantiate(tilePrefab, new Vector3(x,y,0), Quaternion.identity)as GameObject;
g.transform.name = string.Format("Tile ({0},{1})",x,y);
g.transform.parent = gameObject.transform;
tileBoard[x,y] = g.GetComponent<Tile>();
g.GetComponent<SliderJoint2D>().anchor = new Vector2(x+GridXOffset, y);
}
}
//Create line object
arrayLine = new VectorLine("MyLine", new Vector3[100], Color.green, arrayLineMat, 5.0f, LineType.Continuous, Joins.Fill);
arrayLineTip = new VectorLine("MyLine", new Vector3[100], Color.red, arrayTipMat, 5.0f, LineType.Continuous, Joins.Fill);
arrayLine.ZeroPoints();
arrayLineTip.ZeroPoints();
//Initialize dimmer
dim = Instantiate(dimPrefab, new Vector3(-GridXOffset, -1.509109f, -2f), Quaternion.identity) as GameObject;
dim.transform.name = "Dimmer";
dim.transform.parent = gameObject.transform;
dim.renderer.enabled = false;
dim.renderer.sortingLayerName = "Default";
dim.renderer.sortingOrder = 0;
//Initialize lifebar
lifeBar.renderer.enabled = false;
lifeBar.renderer.sortingLayerName = "GUI";
lifeBar.renderer.sortingOrder = 1;
gameObject.transform.position = new Vector3 (GridXOffset, GridYOffset, 0);
}