- Home /
help needed: death on collision, fade then restart
hey everyone! i need some help with a really simple js. (my skills are limited, i'm a bloody beginner) so, what i want to acchive:
player hits the target, fade to black (or if it's not too hard - the image gets blurred), and after 1 sec. the scene restarts.
my death-collision js looks like this right now:
function OnCollisionEnter (collision : Collision)
{
if(collision.gameObject.tag == "Enemy")
{
Application.LoadLevel("mylevel01");
}
}
this prefectly working, but if got no clue how to fade and restart the scene after 1 sec.
Answer by LightSource · Mar 27, 2013 at 05:33 PM
Fading: http://answers.unity3d.com/questions/119918/transitions-between-changing-scenes.html
Google is a great recource:
http://lmgtfy.com/?q=Fading+in%2Fout+unity
Your answer
Follow this Question
Related Questions
How to restart the level upon cantact 1 Answer
My Player dies only when he wants to?!? 1 Answer
Don't restart music on death 2 Answers
Why isn't my Death Script Working? 3 Answers
Help with player death on collision! 2 Answers