예제 #1
0
    public void SetEndTimer()
    {
        //finds the reference
        GameObject Pathfinder = GameObject.Find("Pathfinder");
        FlightPath flightPath = Pathfinder.GetComponent <FlightPath> ();

        //Stores the variable "TimeTillEnd" into EndTimer
        EndTimer = flightPath.TimeTillEnd;

        //Sets bool to TRUE so script can start the end timer
        StartEndTimer = true;

        GameObject  scoreDisplay = GameObject.Find("ScoreDisplay");
        ScorePoints scorePoints  = scoreDisplay.GetComponent <ScorePoints> ();

        //Calls the final score function in ScorePoints.cs
        scorePoints.ScoreResult();
    }