Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private IEnumerator AnimateRevealing()
- {
- renderer.enabled = true;
- var color = renderer.material.color;
- for(var time = 0; time < duration; time += Time.deltaTime)
- {
- color.a = time / duration;
- renderer.material.color = color;
- yield return null;
- }
- color.a = 1;
- renderer.material.color = color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement