Пример #1
0
    private void InstantiatePlayer()
    {
        playerInstance = Instantiate(playerPrefab);
        playerInstance.SetPlayerModel(modelArray[profile.GetCurrentCharacter()]);
        MazeCell randomPlayerCell = mazeInstance.GetRandomCell();

        playerInstance.transform.parent = gameArea;
        playerInstance.SetLocation(randomPlayerCell);
        playerInstance.gameObject.name = "Player";
    }