I have created 2 cameras 1 = FPC(first person camera 2 = TFC (Third person camera) but it says in my debug.log Unexpected token:Input. here is my code please help me
#pragma strict
function Update()
Input.GetButtonDown(c);
{
//Calling the camera FPC and making active
GetComponent.GameObject.camera.FPC = true;
}
if(FPC === true)
{
//Calling the camera 3PC and making inactive
GetComponent.GameObject.camera.TPC = false;
}else
//if camera 3PC === false
GetComponent.GameObject.camera.FPC = true;
var cam1:GameObject;
var cam1show:boolean=true;
var cam2:GameObject;
var cam2show:boolean=false;
function Update()
{
if(cam1==true){cam1.active=true;cam2.active=false;}
else
if(cam1==false){cam1.active=false;cam2.active=true;}
if(cam2==true){cam2.active=true;cam1.active=false;}
else
if(cam2==false){cam2.active=false;cam1.active=true;}
wait();
}
function wait()
{
yield WaitForSeconds(5);
cam1show=false;
cam2show=true;
// this scrips should switch camerias after 5 seconds, hope this helps
}