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


C# Player.SetLocation方法代码示例

本文整理汇总了C#中Player.SetLocation方法的典型用法代码示例。如果您正苦于以下问题:C# Player.SetLocation方法的具体用法?C# Player.SetLocation怎么用?C# Player.SetLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Player的用法示例。


在下文中一共展示了Player.SetLocation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BeginGame

 private IEnumerator BeginGame()
 {
     mazeInstance = Instantiate(mazePrefab) as Maze;
     yield return StartCoroutine (mazeInstance.Generate());
     playerInstance = Instantiate(playerPrefab) as Player;
     playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
     StartCoroutine(mazeInstance.Generate());
 }
开发者ID:northtwilight,项目名称:UnityMazeDemo,代码行数:8,代码来源:GameManager.cs

示例2: 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;
		playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
		Camera.main.clearFlags = CameraClearFlags.Depth;
		Camera.main.rect = new Rect(0f, 0f, 0.5f, 0.5f);
	}
开发者ID:gulfaraz,项目名称:GGJ2016,代码行数:10,代码来源:GameManager.cs

示例3: BeginGame

	private IEnumerator BeginGame () {
		myMaze = Instantiate (mazeFab) as Maze;
		yield return StartCoroutine (myMaze.generate ());
		myPlayer = Instantiate (playerFab) as Player;
		myPlayer.SetLocation (myMaze.getCell (myMaze.RandomCoord));

		myPlayer2 = Instantiate (player2Fab) as Player2;
		myPlayer2.SetLocation (myMaze.getCell (myMaze.RandomCoord));

		myPlayer.otherPlayer = myPlayer2;
		myPlayer2.otherPlayer = myPlayer;
	}
开发者ID:kleptodorf,项目名称:CS3013,代码行数:12,代码来源:GameManager.cs

示例4: BeginGame

 private IEnumerator BeginGame()
 {
     Camera.main.clearFlags = CameraClearFlags.Skybox;
     Camera.main.rect = new Rect(0f, 0f, 1f, 1f);
     HUDInfo._Hunger = 200;
     mazeInstance = Instantiate(mazePrefab) as Maze;
     yield return StartCoroutine(mazeInstance.Generate());
     playerInstance = Instantiate(playerPrefab) as Player;
     playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
     Player.gameOver = false;
     foodInstance = Instantiate(foodPrefab) as Food;
     SpawnNewFood();
     Camera.main.clearFlags = CameraClearFlags.Depth;
     Camera.main.rect = new Rect(0f, 0f, 0.5f, 0.5f);
 }
开发者ID:suhongjin94,项目名称:Unity-Maze,代码行数:15,代码来源:GameManager.cs

示例5: 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

示例6: SpawnPlayer

 void SpawnPlayer ()
 {
     playerInstance = Instantiate(playerPrefab) as Player;
     playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
 }
开发者ID:Zoltaris,项目名称:MinotaurMaze,代码行数:5,代码来源:GameManager.cs


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