void Start() { tm = GetComponent <TextMesh>(); if (tickerText == null || tm == null) { DestroyImmediate(this); } tickerBand = WMSK.instance.GetComponent <WMSK_Ticker>().tickerBands[tickerText.tickerLine]; scrollSpeed = tickerBand.scrollSpeed; Transform t = transform.Find("shadow"); if (t != null) { tmShadow = t.GetComponent <TextMesh>(); } map = WMSK.GetInstance(transform); startTime = map.time; fadeIn = tickerText.fadeDuration > 0; fadeOut = tickerText.fadeDuration > 0 && tickerText.duration > 0 && tickerBand.scrollSpeed == 0; if (fadeOut) { fadeOutTime = tickerText.duration - tickerText.fadeDuration; } alpha = tm.color.a; if (tmShadow != null) { alphaShadow = tmShadow.color.a; } blinkingCount = 0; blinkingLapTime = startTime; blinking = tickerText.blinkInterval > 0; Update(); }
void Start() { oldMaterial = GetComponent <Renderer> ().sharedMaterial; GenerateMaterial(); map = WMSK.GetInstance(transform); startTime = map.time; lapTime = startTime - speed; }
void Start() { GenerateMaterial(); map = WMSK.GetInstance(transform); highlightFadeStart = map.time; if (fadeEntity != null) { fadeEntity.isFading = true; } Update(); }
void Start() { map = WMSK.GetInstance(transform); startTime = map.time; lapTime = startTime - speed; startingScale = transform.localScale; if (stopBlinkAfter <= 0) { stopBlinkAfter = float.MaxValue; } }
public static void Animate(FADER_STYLE style, IFader fadeEntity, Renderer renderer, Color initialColor, Color color, float duration) { SurfaceFader fader = renderer.GetComponent <SurfaceFader> (); if (fader == null) { fader = renderer.gameObject.AddComponent <SurfaceFader>(); fader.fadeMaterial = Instantiate(renderer.sharedMaterial); fader.fadeMaterial.hideFlags = HideFlags.DontSave; renderer.sharedMaterial = fader.fadeMaterial; } fader.duration = duration + 0.0001f; fader.color = color; fader.style = style; fader._renderer = renderer; fader.fadeEntity = fadeEntity; fadeEntity.isFading = true; fader.initialColor = initialColor; fader.map = WMSK.GetInstance(renderer.transform); fader.highlightFadeStart = fader.map.time; fader.Update(); }