Exemplo n.º 1
0
    void Start()
    {
        theStationManager = StationManagerTutorial.S_StationManager;
        theScoreManager = ScoreManagerTutorial.S_ScoreManager;
        thePowerControl = PowerControlTutorial.S_PowerControl;
        theUIManager = UIManagerTutorial.S_UIManager;

        thePowerControl.TogglePowerLock(true);
        theStationManager.StationUpdate();
        thePowerControl.SetSpeedLimit(initialSpeedLimit);

        StartGameSection();
    }
Exemplo n.º 2
0
 void OnTriggerEnter(Collider _other)
 {
     if (_other.gameObject.tag == "Train_Car_Front")
     {
         if (!tutorial)
         {
             if (speedEventType == SpeedEventType.SpeedLimit)
             {
                 Debug.Log("Current Speed Limit: " + speedEventValue);
                 thePowerControl.SetSpeedLimit(speedEventValue);
                 if (thePowerControl.KmhSpeed <= speedEventValue)
                 {
                     theScoreManager.Scoring_SpeedLimit(true);
                     //theGameMaster.Scoring_UnderSpeedLimit();
                 }
             }
             else if (speedEventType == SpeedEventType.SpeedRecommendation)
             {
                 Debug.Log("Speed Recommendation: " + speedEventValue);
                 if (thePowerControl.KmhSpeed == speedEventValue)
                 {
                     theScoreManager.Scoring_RecommendedSpeed();
                 }
             }
         }
         else if (tutorial)
         {
             if (speedEventType == SpeedEventType.SpeedLimit)
             {
                 Debug.Log("Current Speed Limit: " + speedEventValue);
                 thePowerControlTutorial.SetSpeedLimit(speedEventValue);
                 if (thePowerControlTutorial.KmhSpeed <= speedEventValue)
                 {
                     theScoreManagerTutorial.Scoring_SpeedLimit(true);
                     //theGameMaster.Scoring_UnderSpeedLimit();
                 }
             }
             else if (speedEventType == SpeedEventType.SpeedRecommendation)
             {
                 Debug.Log("Speed Recommendation: " + speedEventValue);
                 if (thePowerControlTutorial.KmhSpeed == speedEventValue)
                 {
                     theScoreManagerTutorial.Scoring_RecommendedSpeed();
                 }
             }
         }
     }
 }