Created
November 8, 2018 03:13
-
-
Save Ratstail91/f9273d08bbcbcc669aaa9e3e911bdfe4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void FlashColor(float r, float g, float b, float delay) { | |
StartCoroutine(FlashColorInternal(r, g, b, delay)); | |
} | |
IEnumerator FlashColorInternal(float r, float g, float b, float delay) { | |
spriteRenderer.color = new Color(r, g, b); | |
yield return new WaitForSeconds(delay); | |
spriteRenderer.color = new Color(1, 1, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment