I am creating an menu in witch the camera flies into the scene over the terrain. I then want the camera to move to an other part of the map when when I click the play button. The play button is a 3d text with a colider box on it and I have to seperate Animations for the the FlyIn and LevelSelect. This is the code I have on the collider.
var playing : boolean = false;
function OnMouseEnter() { //Change the text color of the test renderer.material.color = Color.red; }
function OnMouseExit() { //Change the text color of the test renderer.material.color = Color.white; }
function OnMouseDown()
{
if (!playing) {
playing = true;
animation.Play ("LevelSelect");
yield WaitForSeconds(animation.clip.length);
playing = false;
}
}
What am I not doing?