本文整理汇总了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());
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例6: SpawnPlayer
void SpawnPlayer ()
{
playerInstance = Instantiate(playerPrefab) as Player;
playerInstance.SetLocation(mazeInstance.GetCell(mazeInstance.RandomCoordinates));
}