Eonirr

Untitled

Feb 13th, 2026
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public IEnumerator HitFlash(SpriteRenderer sprite, float duration, Color flashColor)
  2. {
  3. Color original = sprite.color;
  4.  
  5. sprite.color = flashColor;
  6.  
  7. yield return new WaitForSeconds(duration);
  8.  
  9. sprite.color = original;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment