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


C# Box.SetLocation方法代码示例

本文整理汇总了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);
 }
开发者ID:futamiyuuki,项目名称:Unity-Chan,代码行数:24,代码来源:GameManager.cs


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