void Set(StrokeGraphic strokeGraphic, Stroke[] strokes) { if (strokeGraphic != null) { strokeGraphic.SetStrokes(strokes); } }
void Clear(StrokeGraphic strokeGraphic) { if (strokeGraphic != null) { strokeGraphic.ClearStrokes(); } }
void Set(StrokeGraphic strokeGraphic, Glyph glyph) { if (strokeGraphic != null) { strokeGraphic.SetStrokes(glyph); } }
IEnumerator FadeOut(StrokeGraphic strokeGraphic, Color targetColor) { targetColor.a = 0f; if (strokeGraphic != null) { strokeGraphic.CrossFadeColor(targetColor, fadeOutDuration, true, true); } yield return(new WaitForSeconds(fadeOutDuration * 1.5f));//The order of crossfade finalization and the end of this couroutine is inconsistent if the duration is the same Clear(strokeGraphic); if (strokeGraphic != null) { strokeGraphic.canvasRenderer.SetColor(Color.white); } }
bool IsClear(StrokeGraphic strokeGraphic) { return(strokeGraphic == null || strokeGraphic.IsClear); }