本文整理汇总了C#中Box.SetLocation方法的典型用法代码示例。如果您正苦于以下问题:C# Box.SetLocation方法的具体用法?C# Box.SetLocation怎么用?C# Box.SetLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box
的用法示例。
在下文中一共展示了Box.SetLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BeginGame
private IEnumerator BeginGame()
{
Camera.main.clearFlags = CameraClearFlags.Skybox;
Camera.main.rect = new Rect(0f, 0f, 1f, 1f);
mazeInstance = Instantiate(mazePrefab) as Maze;
yield return StartCoroutine(mazeInstance.Generate());
playerInstance = Instantiate(playerPrefab) as Player;
boxInstance = Instantiate (boxPrefab) as Box;
boxInstance2 = Instantiate (boxPrefab) as Box;
boxInstance3 = Instantiate (boxPrefab) as Box;
samuraiInstance = Instantiate (samurai) as Player;
playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
boxInstance.SetLocation (mazeInstance.GetCell (mazeInstance.RandomCoordinates));
boxInstance2.SetLocation (mazeInstance.GetCell (mazeInstance.RandomCoordinates));
boxInstance3.SetLocation (mazeInstance.GetCell (mazeInstance.RandomCoordinates));
samuraiInstance.SetLocation (mazeInstance.GetCell (mazeInstance.RandomCoordinates));
this.transform.position = samuraiInstance.transform.position;
audio.Play ();
Debug.Log (this.transform.GetChild (0).transform.name);
this.transform.GetChild (0).audio.Play ();
start = true;
Camera.main.clearFlags = CameraClearFlags.Depth;
Camera.main.rect = new Rect(0f, 0f, 0.5f, 0.5f);
}