Ejemplo n.º 1
0
    private void SpawnPlayer()
    {
        player.RestartPlayer();
        Transform spawnPoint;

        if (currentLevel.IsDeepSpace())
        {
            Planet planet = FindObjectOfType <PlanetLocator>().FindPlanetOfType(levelsManager.GetCurrentPlanet());
            spawnPoint = planet.transform;
            //player.SetCurrentPlanet(planet);
        }
        else
        {
            spawnPoint = currentLevel.GetPlayerSpawnPoint();
        }
        player.transform.position = spawnPoint.position;
        player.transform.rotation = spawnPoint.rotation;
    }