/// <summary> /// Sets the reactive reticle type to a new one, then sets it back after a delay. /// </summary> /// <param name="type">The new reactive reticle type.</param> /// <param name="delay">Time to wait (in seconds) after setting the new reticle type. private IEnumerator SetReticleDelayed(ReactiveReticle.ReticleType type, float delay) { // Set new reactive reticle type SetReticle(type); // Wait for delay to pass first yield return(new WaitForSeconds(delay)); // Set the type back SetReticle(ReactiveReticle.ReticleType.NotReady); // Finish yield return(null); }
/// <summary> /// Sets the reactive reticle type to a new one, then sets it back after a delay. /// </summary> /// <param name="type">The new reactive reticle type.</param> /// <param name="delay">Time to wait (in seconds) after setting the new reticle type. public void SetReticle(ReactiveReticle.ReticleType type, float delay) { // Call delaying coroutine StartCoroutine(SetReticleDelayed(type, delay)); }
/// <summary> /// Sets the reactive reticle type to a new one. /// </summary> /// <param name="type">The new reactive reticle type.</param> public void SetReticle(ReactiveReticle.ReticleType type) { // Set new reactive reticle type ReactiveReticle.SetType(type); }