Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent <TrainController>())
        {
            if (other.GetComponent <Inventory>().Passengers < uiDataManager.mapGenerator.numberOfPassengers)
            {
                uiDataManager.TurnOnEndGameText(true, "Find other passengers!");
            }
            else
            {
                //uiDataManager.TurnOnEndGameText(true, "Congratulations!");
                FindObjectOfType <TracklessGenerator.MapGenerator>().TurnOffCollidersOfEndPointNeighbours();
                FindObjectOfType <IntroAndOutroManager>().PlayOutroSequence();
                StartCoroutine(FindObjectOfType <UIDataManager>().FadeToBlack(5.5f));

                SetCanvasValues();
            }
        }
    }