/// <summary> /// Fades out this telegraph. It will destroy it shortly after its been completely faded out. /// </summary> /// <param name="fadeSpeed"></param> public void End(float fadeSpeed, float destroySpeed = 0.0f) { //Trace.Script("Hiding telegraph over " + duration + " seconds!", this); StartCoroutine(StratusRoutines.Fade(this.gameObject, 0f, fadeSpeed)); if (destroySpeed > 0.0f) { GameObject.Destroy(this.gameObject, destroySpeed); } }
//------------------------------------------------------------------------/ // Routines //------------------------------------------------------------------------/ /// <summary> /// Fades in this telegraph. /// </summary> /// <param name="duration"></param> public void Start(float duration) { //Trace.Script("Displaying telegraph over " + duration + " seconds!", this); StartCoroutine(StratusRoutines.Fade(this.gameObject, 1f, duration)); }