Пример #1
0
    public void Setup()
    {
        if (failureEnabled)
        {
            Debug.Log($"TestVAR: {testVar}");
            testVar = "Setup";
            Debug.Log($"TestVAR: {testVar}");
            playersVehicle = VTOLAPI.instance.GetPlayersVehicleGameObject();
            Debug.Log($"Running Setup for {failureName}");
            if (hourlyFailureRate != 0.0)
            {
                failureRate = hourlyFailureRate / 3600;
                Debug.Log($"Hourly failure rate {hourlyFailureRate} for {failureName} is {failureRate}");
            }

            flightWarnings = playersVehicle.GetComponentInChildren <FlightWarnings>();


            Debug.Log("Setting up HUD");
            SetupHUDWarning();

            flightWarning = AddWarning($"{failureName}", warningAudio);
            //SetHUDWarningText($"{failureName}");

            if (flightWarning == null)
            {
                Debug.Log("Flight Warning Not Created");
            }
            Debug.Log(HUDWarning.warnText.text);
            Debug.Log("Running specific setup");
            SetupSpecific();
        }
    }
Пример #2
0
 public FlightWarnings.FlightWarning AddWarning(string warningName, AudioClip warningAudio = null)
 {
     Debug.Log("Creating new FlightWarning warning");
     FlightWarnings.FlightWarning newWarning = new FlightWarnings.FlightWarning(warningName, warningAudio);
     flightWarning = newWarning;
     if (HUDWarning)
     {
         HUDWarning.flightWarning = newWarning;
     }
     else
     {
         Debug.Log("No HUD warning to add new warning to?");
     }
     return(newWarning);
 }
Пример #3
0
 public void addContinuousWarning(FlightWarnings.FlightWarning warning)
 {
     flightWarnings.AddContinuousWarning(warning);
 }