Beispiel #1
0
    // method: change the player's fadedness according to the current time progression – only if this Scene Fader's progression ratio takes precedence (is farther along, or is equivalent and of the left hand), and only all this if a scene fading interaction has occurred yet and the time since the last time of scene fading interaction was not longer ago than the combined duration of prefading and fading for either Scene Fader //
    public void progressFadedness()
    {
        if ((lastTimeOfSceneFadingInteraction >= 0f) && ((Time.time - lastTimeOfSceneFadingInteraction) <= (Mathf.Max(durationPrefade, other.durationPrefade) + Mathf.Max(durationFading, other.durationFading))))
        {
            float progressionRatioThisHand  = progressionRatio();
            float progressionRatioOtherHand = other.progressionRatio();

            if ((progressionRatioThisHand > progressionRatioOtherHand) || ((progressionRatioThisHand == progressionRatioOtherHand) && (this == left)))
            {
                changeFadedness(progressionRatio());
            }
        }
    }