示例#1
0
    void NextStation()
    {
        NextStationID++;

        if (Stations[NextStationID] != null)
        {
            nextStation = Stations[NextStationID];
            float dist = distBetweenStation(nextStation);
            DistFromStationInit = dist;
            DistFromStation     = dist;
            StationText.SetText("Station " + (NextStationID + 1) + "/" + Stations.Count);


            animalSpawner.ActivateSpawn(transform.position, nextStation.transform.position);
        }

        //for sound, to reset the "halfway" whistle and 3/4 way bells
        whistleAlreadyPlayed = false;
        bellsAlreadyPlayed   = false;
    }
示例#2
0
 float distBetweenStation(EndTrainStation station)
 {
     return(station.GetPos() - PerfectStopPos.transform.position.x);
 }