Пример #1
0
    //------------------------
    // >>> Post Process
    //------------------------

    // Update post processing settings
    private void UpdatePP(PPSettings a_settings)
    {
        // Switch settings
        switch (a_settings)
        {
        // Set to default, don't interpolate
        case PPSettings.Default: {
            postProcessVignette.intensity.value           = vignetteIntensivityDefault;
            postProcessColorAdjustments.colorFilter.value = colorAdjustmentsColorDefault;
            break;
        }

        // Set to successful PP, interpolate values
        case PPSettings.Success: {
            postProcessVignette.intensity.Interp(vignetteIntensivityDefault, vignetteIntensivitySuccess, ppInterpTimer);
            postProcessColorAdjustments.colorFilter.Interp(colorAdjustmentsColorDefault, colorAdjustmentsColorSuccess, ppInterpTimer);
            break;
        }

        // Set to failed PP, interpolate values
        case PPSettings.Failed: {
            postProcessVignette.intensity.Interp(vignetteIntensivityDefault, vignetteIntensivityFailed, ppInterpTimer);
            postProcessColorAdjustments.colorFilter.Interp(colorAdjustmentsColorDefault, colorAdjustmentsColorFailed, ppInterpTimer);
            break;
        }
        }
    }
Пример #2
0
 // Update header size
 private void UpdateResults(PPSettings a_settings)
 {
     // If argument PPsettings is not default
     if (a_settings != PPSettings.Default)
     {
         // Interpolate alpha of results screen
         resultsUIGroup.alpha = Mathf.Min(-1.0f + ppInterpTimer, 1f);
     }
 }
Пример #3
0
 // Set mission state to failed and display failed screen
 public void SetMissionFailed()
 {
     // Set "is post processing in phase of updating" to true
     isPPUpdating = true;
     // Reset pp interpolation timer
     ppInterpTimer = 0f;
     // Update results screen text
     textMeshHeader.SetText(Localization.Translate("RESULTS_MISSION_FAILED"));
     textMeshSubheader.SetText(Localization.Translate("RESULTS_MISSION_FAILED_SUB"));
     textMeshHeader.color = failedMissionColor;
     // Set which PP setting is used to failed
     whichPPSettingisSet = PPSettings.Failed;
 }
Пример #4
0
 // Set mission state to success and display success screen
 public void SetMissionSuccess()
 {
     // Set "is post processing in phase of updating" to true
     isPPUpdating = true;
     // Reset pp interpolation timer
     ppInterpTimer = 0f;
     // Update results screen text
     textMeshHeader.SetText(Localization.Translate("RESULTS_MISSION_SUCCESSFUL"));
     textMeshSubheader.SetText(Localization.Translate("RESULTS_MISSION_SUCCESSFUL_SUB"));
     textMeshHeader.color = successfulMissionColor;
     // Set which PP setting is used to success
     whichPPSettingisSet = PPSettings.Success;
 }
Пример #5
0
 // Update header size
 private void UpdateHeader(PPSettings a_settings)
 {
     // If argument PPsettings are different from default
     if (a_settings != PPSettings.Default)
     {
         // Interpolate scale of results screen
         textMeshHeaderTransform.localScale = new Vector3(Mathf.Min(ppInterpTimer, 1f), Mathf.Min(ppInterpTimer, 1f), 1f);
         gameplayUIGroup.alpha = Mathf.Max(1.0f - ppInterpTimer * 2, 0f);
         resultsUIGroup.alpha  = 0f;
         // Else if argument PPsetting is default
     }
     else
     {
         // Set header scale to 0 and turn on gameplay UI
         textMeshHeaderTransform.localScale = Vector3.zero;
         gameplayUIGroup.alpha = 1f;
         resultsUIGroup.alpha  = 0f;
     }
 }