All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

Effects

Class in Yarn.Unity

Inherits from System.Object

Summary

public static class Effects

Methods

Name
Description

FadeAlpha(CanvasGroup,float,float,float,Action,InterruptionFlag)

A coroutine that fades a CanvasGroup object's opacity from from to to over the course of fadeTime seconds, and then invokes onComplete . An InterruptionFlag may be used to signal that the fade should be interrupted; if this happens, the opacity is set to to .

Typewriter(TextMeshProUGUI,float,Action,Action,InterruptionFlag)

Typewriter(TextMeshProUGUI,float,Action,Action,InterruptionFlag)

Method in Effects

Summary

public static IEnumerator Typewriter(TextMeshProUGUI text, float lettersPerSecond, Action onCharacterTyped = null, Action onComplete = null, InterruptionFlag interruption = null)

Parameters

Name
Description

TextMeshProUGUI text

float lettersPerSecond

Action onCharacterTyped

Action onComplete

Yarn.Unity.InterruptionFlag interruption

FadeAlpha(CanvasGroup,float,float,float,Action,InterruptionFlag)

Method in Effects

Summary

A coroutine that fades a CanvasGroup object's opacity from from to to over the course of fadeTime seconds, and then invokes onComplete . An may be used to signal that the fade should be interrupted; if this happens, the opacity is set to to .

Parameters

Name
Description

float from

The opacity value to start fading from, ranging from 0 to 1.

float to

The opacity value to end fading at, ranging from 0 to 1.

Action onComplete

A delegate to invoke after fading is complete.

CanvasGroup canvasGroup

float fadeTime

InterruptionFlag

interruption

public static IEnumerator FadeAlpha(CanvasGroup canvasGroup, float from, float to, float fadeTime, Action onComplete = null, InterruptionFlag interruption = null)
Yarn.Unity.InterruptionFlag