Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        winCanvas.SetActive(false);
        mainCamera = Camera.main;

        roadLongitudeRemaining = roadLongitude;
        firstRoad = FindObjectOfType <CarreteraSpawnBehaviour>();
        firstRoad.Initialize();

        FindObjectOfType <CharacterBehaviour>().Initialize();
    }
Esempio n. 2
0
    public void Reinitialize()
    {
        roadLongitudeRemaining = roadLongitude;

        CarreteraSpawnBehaviour[] carreteras = FindObjectsOfType <CarreteraSpawnBehaviour>();
        foreach (CarreteraSpawnBehaviour carretera in carreteras)
        {
            if (carretera != firstRoad)
            {
                Destroy(carretera.gameObject);
            }
        }

        firstRoad.Initialize();

        FindObjectOfType <CharacterBehaviour>().Initialize();
    }